DIALOG_ZONE_MANAGER: refresh zone display when resizing the dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17892
This commit is contained in:
parent
e5a17b96a3
commit
15e5eabb91
|
@ -226,6 +226,13 @@ int InvokeZonesManager( PCB_BASE_FRAME* aCaller, ZONE_SETTINGS* aZoneInfo )
|
|||
}
|
||||
|
||||
|
||||
void DIALOG_ZONE_MANAGER::onDialogResize( wxSizeEvent& event )
|
||||
{
|
||||
event.Skip();
|
||||
FitCanvasToScreen();
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_ZONE_MANAGER::OnZoneSelectionChanged( ZONE* zone )
|
||||
{
|
||||
for( ZONE_SELECTION_CHANGE_NOTIFIER* i :
|
||||
|
|
|
@ -74,6 +74,7 @@ protected:
|
|||
void SelectZoneTableItem( wxDataViewItem const& aItem );
|
||||
|
||||
void OnViewZonesOverviewOnLeftUp( wxMouseEvent& aEvent ) override;
|
||||
void onDialogResize( wxSizeEvent& event ) override;
|
||||
|
||||
|
||||
void OnOk( wxCommandEvent& aEvt );
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
|
||||
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf02)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -104,6 +104,7 @@ DIALOG_ZONE_MANAGER_BASE::DIALOG_ZONE_MANAGER_BASE( wxWindow* parent, wxWindowID
|
|||
m_MainBoxSizer->Fit( this );
|
||||
|
||||
// Connect Events
|
||||
this->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_ZONE_MANAGER_BASE::onDialogResize ) );
|
||||
m_viewZonesOverview->Connect( wxEVT_CHAR, wxKeyEventHandler( DIALOG_ZONE_MANAGER_BASE::OnTableChar ), NULL, this );
|
||||
m_viewZonesOverview->Connect( wxEVT_CHAR_HOOK, wxKeyEventHandler( DIALOG_ZONE_MANAGER_BASE::OnTableCharHook ), NULL, this );
|
||||
m_viewZonesOverview->Connect( wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( DIALOG_ZONE_MANAGER_BASE::OnDataViewCtrlSelectionChanged ), NULL, this );
|
||||
|
@ -119,6 +120,7 @@ DIALOG_ZONE_MANAGER_BASE::DIALOG_ZONE_MANAGER_BASE( wxWindow* parent, wxWindowID
|
|||
DIALOG_ZONE_MANAGER_BASE::~DIALOG_ZONE_MANAGER_BASE()
|
||||
{
|
||||
// Disconnect Events
|
||||
this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_ZONE_MANAGER_BASE::onDialogResize ) );
|
||||
m_viewZonesOverview->Disconnect( wxEVT_CHAR, wxKeyEventHandler( DIALOG_ZONE_MANAGER_BASE::OnTableChar ), NULL, this );
|
||||
m_viewZonesOverview->Disconnect( wxEVT_CHAR_HOOK, wxKeyEventHandler( DIALOG_ZONE_MANAGER_BASE::OnTableCharHook ), NULL, this );
|
||||
m_viewZonesOverview->Disconnect( wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( DIALOG_ZONE_MANAGER_BASE::OnDataViewCtrlSelectionChanged ), NULL, this );
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnSize">onDialogResize</event>
|
||||
<object class="wxBoxSizer" expanded="true">
|
||||
<property name="minimum_size">-1,-1</property>
|
||||
<property name="name">m_MainBoxSizer</property>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
|
||||
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf02)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -62,6 +62,7 @@ class DIALOG_ZONE_MANAGER_BASE : public DIALOG_SHIM
|
|||
wxButton* m_sdbSizerCancel;
|
||||
|
||||
// Virtual event handlers, override them in your derived class
|
||||
virtual void onDialogResize( wxSizeEvent& event ) { event.Skip(); }
|
||||
virtual void OnTableChar( wxKeyEvent& event ) { event.Skip(); }
|
||||
virtual void OnTableCharHook( wxKeyEvent& event ) { event.Skip(); }
|
||||
virtual void OnDataViewCtrlSelectionChanged( wxDataViewEvent& event ) { event.Skip(); }
|
||||
|
|
Loading…
Reference in New Issue