Fix grid resizing issues.

Normally we don't want to resize when a control is open (such as a
drop-down), but it appears safe enough when all the controls are
just text-button controls.

Fixes https://gitlab.com/kicad/code/kicad/issues/6090
This commit is contained in:
Jeff Young 2020-10-20 23:31:15 +01:00
parent e5089d783d
commit 3d135189d3
2 changed files with 2 additions and 3 deletions

View File

@ -517,8 +517,7 @@ void DIALOG_CONFIGURE_PATHS::OnGridCellChange( wxGridEvent& aEvent )
void DIALOG_CONFIGURE_PATHS::OnUpdateUI( wxUpdateUIEvent& event )
{
if( m_gridWidthsDirty && ( !m_EnvVars->IsCellEditControlShown()
&& !m_SearchPaths->IsCellEditControlShown() ) )
if( m_gridWidthsDirty )
{
int width = m_EnvVars->GetClientRect().GetWidth();

View File

@ -188,7 +188,7 @@ void PANEL_TEXT_VARIABLES::OnGridCellChange( wxGridEvent& aEvent )
void PANEL_TEXT_VARIABLES::OnUpdateUI( wxUpdateUIEvent& event )
{
if( m_gridWidthsDirty && ( !m_TextVars->IsCellEditControlShown() ) )
if( m_gridWidthsDirty )
{
int width = m_TextVars->GetClientRect().GetWidth();