desktop: don't close edit dialog when save is cancelled

In the edit dialog, when OK is pressed, anotehr modal dialog opens and asks if
the template should be saved.  If the answer is negative, return to the edit
dialog rather than closing it abandoning the changes.

To abandon the changes, there is still the cancel buttton of the edit dialog.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
Robert C. Helling 2021-11-25 13:23:24 +01:00 committed by Dirk Hohndel
parent 9583173425
commit 9aced3f49a
2 changed files with 1 additions and 16 deletions

View File

@ -180,6 +180,7 @@ void TemplateEdit::saveSettings()
}
if (templateOptions.color_palette_index == CUSTOM)
custom_colors = templateOptions.color_palette;
emit accept();
}
}
}

View File

@ -571,22 +571,6 @@
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>TemplateEdit</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>