mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-19 00:21:36 +00:00
Fix double-click in footprint chooser.
Also fixes the assert when closing the chooser after the 3D view was shown. Fixes https://gitlab.com/kicad/code/kicad/-/issues/18107
This commit is contained in:
parent
cd40f6046b
commit
a3f69046ba
3d-viewer/3d_canvas
pcbnew
@ -218,6 +218,8 @@ public:
|
||||
*/
|
||||
void DoRePaint();
|
||||
|
||||
void OnCloseWindow( wxCloseEvent& event );
|
||||
|
||||
private:
|
||||
// The wxPaintEvent event. mainly calls DoRePaint()
|
||||
void OnPaint( wxPaintEvent& aEvent );
|
||||
@ -228,14 +230,13 @@ private:
|
||||
|
||||
void OnMouseWheel( wxMouseEvent& event );
|
||||
|
||||
void OnMagnify( wxMouseEvent& event );
|
||||
void OnMagnify( wxMouseEvent& event );
|
||||
void OnMouseMove( wxMouseEvent& event );
|
||||
void OnLeftDown( wxMouseEvent& event );
|
||||
void OnLeftUp( wxMouseEvent& event );
|
||||
void OnMiddleUp( wxMouseEvent& event );
|
||||
void OnMiddleDown( wxMouseEvent& event );
|
||||
void OnTimerTimeout_Editing( wxTimerEvent& event );
|
||||
void OnCloseWindow( wxCloseEvent& event );
|
||||
void OnResize( wxSizeEvent& event );
|
||||
void OnTimerTimeout_Redraw( wxTimerEvent& event );
|
||||
|
||||
|
@ -62,12 +62,12 @@ DIALOG_FOOTPRINT_CHOOSER::DIALOG_FOOTPRINT_CHOOSER( PCB_BASE_FRAME* aParent,
|
||||
// Accept handler
|
||||
[this]()
|
||||
{
|
||||
EndModal( wxID_OK );
|
||||
EndQuasiModal( wxID_OK );
|
||||
},
|
||||
// Escape handler
|
||||
[this]()
|
||||
{
|
||||
EndModal( wxID_CANCEL );
|
||||
EndQuasiModal( wxID_CANCEL );
|
||||
} );
|
||||
|
||||
m_SizerTop->Add( m_chooserPanel, 1, wxEXPAND | wxRIGHT, 5 );
|
||||
@ -303,4 +303,12 @@ void DIALOG_FOOTPRINT_CHOOSER::TearDownQuasiModal()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( m_preview3DCanvas )
|
||||
{
|
||||
// Work around assertion firing when we try to LockCtx on a hidden 3D canvas during dtor
|
||||
wxCloseEvent dummy;
|
||||
m_preview3DCanvas->Show();
|
||||
m_preview3DCanvas->OnCloseWindow( dummy );
|
||||
}
|
||||
}
|
||||
|
@ -199,6 +199,11 @@ FOOTPRINT_CHOOSER_FRAME::FOOTPRINT_CHOOSER_FRAME( KIWAY* aKiway, wxWindow* aPare
|
||||
|
||||
FOOTPRINT_CHOOSER_FRAME::~FOOTPRINT_CHOOSER_FRAME()
|
||||
{
|
||||
// Work around assertion firing when we try to LockCtx on a hidden 3D canvas during dtor
|
||||
wxCloseEvent dummy;
|
||||
m_preview3DCanvas->Show();
|
||||
m_preview3DCanvas->OnCloseWindow( dummy );
|
||||
|
||||
// Disconnect Events
|
||||
m_grButton3DView->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED,
|
||||
wxCommandEventHandler( FOOTPRINT_CHOOSER_FRAME::on3DviewReq ),
|
||||
|
Loading…
Reference in New Issue
Block a user