Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuSanka <yusanka@gmail.com>2021-01-04 18:49:19 +0300
committerYuSanka <yusanka@gmail.com>2021-01-04 18:51:29 +0300
commit5845957c7d7e451b44e71c14424a0a00bdb5a87d (patch)
tree1b9888f39a00c8467ce5647e27997f8e79e428de
parent1076e077ce9da0bdc6daa3ab98c135de7cfc00b3 (diff)
Fix of second part of #5531
From the Win 2004 preset combobox lose a focus after change the preset selection and that is why the up/down arrow doesn't work properly. So, set the focus to the combobox explicitly.
-rw-r--r--src/slic3r/GUI/Plater.cpp8
-rw-r--r--src/slic3r/GUI/PresetComboBoxes.cpp7
2 files changed, 15 insertions, 0 deletions
diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp
index 4526bc51d..cb7066630 100644
--- a/src/slic3r/GUI/Plater.cpp
+++ b/src/slic3r/GUI/Plater.cpp
@@ -3558,6 +3558,14 @@ void Plater::priv::on_select_preset(wxCommandEvent &evt)
*/
wxGetApp().obj_list()->update_object_list_by_printer_technology();
}
+
+#ifdef __WXMSW__
+ // From the Win 2004 preset combobox lose a focus after change the preset selection
+ // and that is why the up/down arrow doesn't work properly
+ // (see https://github.com/prusa3d/PrusaSlicer/issues/5531 ).
+ // So, set the focus to the combobox explicitly
+ combo->SetFocus();
+#endif
}
void Plater::priv::on_slicing_update(SlicingStatusEvent &evt)
diff --git a/src/slic3r/GUI/PresetComboBoxes.cpp b/src/slic3r/GUI/PresetComboBoxes.cpp
index 2ef7b3e1f..6031edf78 100644
--- a/src/slic3r/GUI/PresetComboBoxes.cpp
+++ b/src/slic3r/GUI/PresetComboBoxes.cpp
@@ -905,6 +905,13 @@ TabPresetComboBox::TabPresetComboBox(wxWindow* parent, Preset::Type preset_type)
}
evt.StopPropagation();
+#ifdef __WXMSW__
+ // From the Win 2004 preset combobox lose a focus after change the preset selection
+ // and that is why the up/down arrow doesn't work properly
+ // (see https://github.com/prusa3d/PrusaSlicer/issues/5531 ).
+ // So, set the focus to the combobox explicitly
+ this->SetFocus();
+#endif
});
}