UnsavedChangesDialog improvements:

* support markup text and colored icons for cells

+ Extended BitmapTextRenderer for using of markup text
This commit is contained in:
YuSanka 2020-08-05 19:25:04 +02:00
parent 3cf2914a9e
commit 1674d2af29
7 changed files with 664 additions and 102 deletions

View file

@ -3133,8 +3133,16 @@ void Tab::select_preset(std::string preset_name, bool delete_current /*=false*/,
bool Tab::may_discard_current_dirty_preset(PresetCollection* presets /*= nullptr*/, const std::string& new_printer_name /*= ""*/)
{
UnsavedChangesDialog dlg(m_type);
dlg.ShowModal();
if (dlg.ShowModal() == wxID_CANCEL)
return false;
if (dlg.just_continue())
return true;
if (dlg.save_preset())
// save selected changes
return false;
if (dlg.move_preset())
// move selected changes
return false;
if (presets == nullptr) presets = m_presets;
// Display a dialog showing the dirty options in a human readable form.