Allow time to update editor
On GTK, the full editor needs to be shown and, for some systems, the
editor will not show correctly. By yielding we should allow the time to
recalculate sizes for the editor in the grid
Fixes https://gitlab.com/kicad/code/kicad/issues/5690
(cherry picked from commit 871556ebda
)
This commit is contained in:
parent
20788897ee
commit
175c4fe67c
|
@ -503,14 +503,6 @@ bool DIALOG_SYMBOL_PROPERTIES::TransferDataToWindow()
|
||||||
|
|
||||||
Layout();
|
Layout();
|
||||||
|
|
||||||
// Workaround to fix an annoying issue on wxGTK: in some cases selecting a field
|
|
||||||
// to change its value make this value invisible. It happens until the dialog is resized.
|
|
||||||
// So I am guessing there is a problem when initializing sizers settings
|
|
||||||
// Do not create issues on other OS
|
|
||||||
wxSafeYield(); // slice of time to handle events generated when creating the
|
|
||||||
// dialog, especially size events
|
|
||||||
m_fieldsGrid->Layout(); // Force recalculating all sizers in m_fieldsGrid
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -802,6 +794,10 @@ void DIALOG_SYMBOL_PROPERTIES::OnGridEditorShown( wxGridEvent& aEvent )
|
||||||
{
|
{
|
||||||
if( aEvent.GetRow() == REFERENCE_FIELD && aEvent.GetCol() == FDC_VALUE )
|
if( aEvent.GetRow() == REFERENCE_FIELD && aEvent.GetCol() == FDC_VALUE )
|
||||||
m_delayedSelection= true;
|
m_delayedSelection= true;
|
||||||
|
|
||||||
|
/// Yield here to allow events to propagate, updating editor size in GTK
|
||||||
|
/// before showing the editor FLT_MAX
|
||||||
|
wxSafeYield( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1124,4 +1120,4 @@ void DIALOG_SYMBOL_PROPERTIES::OnCheckBox( wxCommandEvent& event )
|
||||||
void DIALOG_SYMBOL_PROPERTIES::OnChoice( wxCommandEvent& event )
|
void DIALOG_SYMBOL_PROPERTIES::OnChoice( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
OnModify();
|
OnModify();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue