partial save code review

This commit is contained in:
Ingo Weyrich
2019-10-21 23:02:48 +02:00
parent 095b5233a9
commit 45900cbd68

View File

@@ -346,13 +346,13 @@ void ProfilePanel::save_clicked (GdkEventButton* event)
} else if (isLastSavedSelected()) { } else if (isLastSavedSelected()) {
toSave = lastsaved; toSave = lastsaved;
} else { } else {
const ProfileStoreEntry* entry = profiles->getSelectedEntry(); const auto entry = profiles->getSelectedEntry();
toSave = entry ? ProfileStore::getInstance()->getProfile(entry) : nullptr; toSave = entry ? ProfileStore::getInstance()->getProfile(entry) : nullptr;
} }
if (toSave) { if (toSave) {
int retCode; int retCode;
if (event->state & Gdk::CONTROL_MASK) { if (isPartial) {
// Build partial profile // Build partial profile
PartialProfile ppTemp(true); PartialProfile ppTemp(true);
partialProfileDlg->applyPaste(ppTemp.pparams, ppTemp.pedited, toSave->pparams, toSave->pedited); partialProfileDlg->applyPaste(ppTemp.pparams, ppTemp.pedited, toSave->pparams, toSave->pedited);