From a61d0a95321014468240909a82b54fd3d0af2075 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Sun, 18 Oct 2020 13:44:15 +0200 Subject: [PATCH] Suppress edit of items of UnsavedChangesDialog, fixed update of the information line + added white version for icons "exit" and "switch_presets" --- resources/icons/white/exit.svg | 13 ++++++ resources/icons/white/switch_presets.svg | 52 ++++++++++++++++++++++++ src/slic3r/GUI/UnsavedChangesDialog.cpp | 6 +-- src/slic3r/GUI/UnsavedChangesDialog.hpp | 3 -- 4 files changed, 66 insertions(+), 8 deletions(-) create mode 100644 resources/icons/white/exit.svg create mode 100644 resources/icons/white/switch_presets.svg diff --git a/resources/icons/white/exit.svg b/resources/icons/white/exit.svg new file mode 100644 index 000000000..e5aebcfc2 --- /dev/null +++ b/resources/icons/white/exit.svg @@ -0,0 +1,13 @@ + + + + + + + + diff --git a/resources/icons/white/switch_presets.svg b/resources/icons/white/switch_presets.svg new file mode 100644 index 000000000..efcc3670c --- /dev/null +++ b/resources/icons/white/switch_presets.svg @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + diff --git a/src/slic3r/GUI/UnsavedChangesDialog.cpp b/src/slic3r/GUI/UnsavedChangesDialog.cpp index 80cc0f715..23c941c51 100644 --- a/src/slic3r/GUI/UnsavedChangesDialog.cpp +++ b/src/slic3r/GUI/UnsavedChangesDialog.cpp @@ -597,7 +597,7 @@ void UnsavedChangesDialog::build(Preset::Type type, PresetCollection* dependent_ #endif wxDataViewColumn* column = new wxDataViewColumn(label, rd, model_column, width, wxALIGN_TOP, wxDATAVIEW_COL_RESIZABLE | wxDATAVIEW_CELL_INERT); #else - wxDataViewColumn* column = new wxDataViewColumn(label, new BitmapTextRenderer(true), model_column, width, wxALIGN_TOP, wxDATAVIEW_COL_RESIZABLE); + wxDataViewColumn* column = new wxDataViewColumn(label, new BitmapTextRenderer(true, wxDATAVIEW_CELL_INERT), model_column, width, wxALIGN_TOP, wxDATAVIEW_COL_RESIZABLE); #endif //__linux__ m_tree->AppendColumn(column); if (set_expander) @@ -727,8 +727,6 @@ void UnsavedChangesDialog::context_menu(wxDataViewEvent& event) void UnsavedChangesDialog::show_info_line(Action action, std::string preset_name) { - if (m_motion_action == action) - return; if (action == Action::Undef && !m_has_long_strings) m_info_line->Hide(); else { @@ -752,8 +750,6 @@ void UnsavedChangesDialog::show_info_line(Action action, std::string preset_name m_info_line->Show(); } - m_motion_action = action; - Layout(); Refresh(); } diff --git a/src/slic3r/GUI/UnsavedChangesDialog.hpp b/src/slic3r/GUI/UnsavedChangesDialog.hpp index 836f24984..c799eba7e 100644 --- a/src/slic3r/GUI/UnsavedChangesDialog.hpp +++ b/src/slic3r/GUI/UnsavedChangesDialog.hpp @@ -210,9 +210,6 @@ class UnsavedChangesDialog : public DPIDialog // selected action after Dialog closing Action m_exit_action {Action::Undef}; - // Action during mouse motion - Action m_motion_action {Action::Undef}; - struct ItemData { std::string opt_key;