mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
OSX and Linux specific: Fixed preset selection
This commit is contained in:
parent
3e54c0b775
commit
9305535039
2 changed files with 23 additions and 6 deletions
|
@ -104,7 +104,14 @@ PresetComboBox::PresetComboBox(wxWindow* parent, Preset::Type preset_type, const
|
|||
// parameters for an icon's drawing
|
||||
fill_width_height();
|
||||
Bind(wxEVT_COMBOBOX_DROPDOWN, [this](wxCommandEvent& evt) { m_suppress_change = false; });
|
||||
Bind(wxEVT_COMBOBOX_CLOSEUP, [this](wxCommandEvent& evt) { m_suppress_change = true ; });
|
||||
Bind(wxEVT_COMBOBOX_CLOSEUP, [this](wxCommandEvent& evt) {
|
||||
// EVT_COMBOBOX_CLOSEUP is called after EVT_COMBOBOX on Windows
|
||||
// so, always set m_suppress_change to "true"
|
||||
#ifndef __WXMSW__
|
||||
if (m_last_selected == evt.GetSelection())
|
||||
#endif //__WXMSW__
|
||||
m_suppress_change = true;
|
||||
});
|
||||
|
||||
Bind(wxEVT_COMBOBOX, [this](wxCommandEvent& evt) {
|
||||
// see https://github.com/prusa3d/PrusaSlicer/issues/3889
|
||||
|
@ -572,6 +579,7 @@ PlaterPresetComboBox::PlaterPresetComboBox(wxWindow *parent, Preset::Type preset
|
|||
} else {
|
||||
evt.StopPropagation();
|
||||
}
|
||||
m_suppress_change = true;
|
||||
});
|
||||
|
||||
if (m_type == Preset::TYPE_FILAMENT)
|
||||
|
@ -911,6 +919,7 @@ TabPresetComboBox::TabPresetComboBox(wxWindow* parent, Preset::Type preset_type)
|
|||
}
|
||||
|
||||
evt.StopPropagation();
|
||||
m_suppress_change = true;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue