mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-15 17:42:14 +00:00
Follow-up to 3622f06bed
Work around 3D scene focus after de-activation of the main
window without having to resort to CallAfter(), which breaks
on Linux with some window managers that follow mouser cursor.
Fixes #5620 #6870 #6992
3622f06bed was not a correct solution,
it broke focus for non-modal windows.
Fixes #7419
The actual issue seems to be caused by wxProgressDialog not playing
well with modal dialogs closed just before wxProgressDialog opens.
If wxProgressDialog parent was not a main frame, keyboard focus
was not restored correctly after the wxProgressDialog closed.
This commit is contained in:
@@ -1447,7 +1447,7 @@ void GCodeViewer::load_toolpaths(const GCodeProcessorResult& gcode_result)
|
||||
static const unsigned int progress_threshold = 1000;
|
||||
wxProgressDialog* progress_dialog = wxGetApp().is_gcode_viewer() ?
|
||||
new wxProgressDialog(_L("Generating toolpaths"), "...",
|
||||
100, wxGetApp().plater(), wxPD_AUTO_HIDE | wxPD_APP_MODAL) : nullptr;
|
||||
100, wxGetApp().mainframe, wxPD_AUTO_HIDE | wxPD_APP_MODAL) : nullptr;
|
||||
|
||||
wxBusyCursor busy;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user