microwave tools: use ShowQuasiModal instead of ShowModal to display WX_TEXT_ENTRY_DIALOG dlgs
In some cases ShowModal does not work fine with our events handlers, at least on Windows. Fixes #7641 https://gitlab.com/kicad/code/kicad/issues/7641
This commit is contained in:
parent
d96577932d
commit
fbf12cb85c
|
@ -77,7 +77,7 @@ FOOTPRINT* MICROWAVE_TOOL::createFootprint( MICROWAVE_FOOTPRINT_SHAPE aFootprint
|
|||
wxString value = StringFromValue( editFrame.GetUserUnits(), gap_size );
|
||||
WX_TEXT_ENTRY_DIALOG dlg( &editFrame, msg, _( "Create microwave footprint" ), value );
|
||||
|
||||
if( dlg.ShowModal() != wxID_OK )
|
||||
if( dlg.ShowQuasiModal() != wxID_OK )
|
||||
return NULL; // cancelled by user
|
||||
|
||||
value = dlg.GetValue();
|
||||
|
@ -92,7 +92,7 @@ FOOTPRINT* MICROWAVE_TOOL::createFootprint( MICROWAVE_FOOTPRINT_SHAPE aFootprint
|
|||
WX_TEXT_ENTRY_DIALOG angledlg( &editFrame, _( "Angle in degrees:" ),
|
||||
_( "Create microwave footprint" ), msg );
|
||||
|
||||
if( angledlg.ShowModal() != wxID_OK )
|
||||
if( angledlg.ShowQuasiModal() != wxID_OK )
|
||||
return NULL; // cancelled by user
|
||||
|
||||
msg = angledlg.GetValue();
|
||||
|
|
|
@ -372,7 +372,7 @@ FOOTPRINT* MICROWAVE_TOOL::createMicrowaveInductor( MICROWAVE_INDUCTOR_PATTERN&
|
|||
msg = StringFromValue( editFrame.GetUserUnits(), aInductorPattern.m_Length );
|
||||
WX_TEXT_ENTRY_DIALOG dlg( &editFrame, _( "Length of Trace:" ), wxEmptyString, msg );
|
||||
|
||||
if( dlg.ShowModal() != wxID_OK )
|
||||
if( dlg.ShowQuasiModal() != wxID_OK )
|
||||
return nullptr; // canceled by user
|
||||
|
||||
msg = dlg.GetValue();
|
||||
|
@ -410,7 +410,7 @@ FOOTPRINT* MICROWAVE_TOOL::createMicrowaveInductor( MICROWAVE_INDUCTOR_PATTERN&
|
|||
WX_TEXT_ENTRY_DIALOG cmpdlg( &editFrame, _( "Component Value:" ), wxEmptyString, msg );
|
||||
cmpdlg.SetTextValidator( FOOTPRINT_NAME_VALIDATOR( &msg ) );
|
||||
|
||||
if( ( cmpdlg.ShowModal() != wxID_OK ) || msg.IsEmpty() )
|
||||
if( ( cmpdlg.ShowQuasiModal() != wxID_OK ) || msg.IsEmpty() )
|
||||
return nullptr; // Aborted by user
|
||||
|
||||
FOOTPRINT* footprint = editFrame.CreateNewFootprint( msg );
|
||||
|
|
Loading…
Reference in New Issue