From 43f5a7c746160897db8854001fee07fef4507667 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 29 Jan 2022 13:14:22 +0100 Subject: [PATCH] DIALOG_PLOT: use a short living quasimodal dialog instead of a long living window. In this case, a quasimodal dialog is the right way. Fixes #10650 https://gitlab.com/kicad/code/kicad/issues/10650 --- pcbnew/pcb_edit_frame.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/pcbnew/pcb_edit_frame.cpp b/pcbnew/pcb_edit_frame.cpp index f42351686b..90e960b6cb 100644 --- a/pcbnew/pcb_edit_frame.cpp +++ b/pcbnew/pcb_edit_frame.cpp @@ -1466,15 +1466,8 @@ void PCB_EDIT_FRAME::ToPlotter( int aID ) SetPlotSettings( plotSettings ); - // Force rebuild the dialog if currently open because the old dialog can be not up to date - // if the board (or units) has changed - wxWindow* dlg = wxWindow::FindWindowByName( DLG_WINDOW_NAME ); - - if( dlg ) - dlg->Destroy(); - - dlg = new DIALOG_PLOT( this ); - dlg->Show( true ); + DIALOG_PLOT dlg( this ); + dlg.ShowQuasiModal( ); }