Move label editors to QuasiModal so the Syntax Help window can be shown.

Fixes https://gitlab.com/kicad/code/kicad/issues/5437
This commit is contained in:
Jeff Young 2020-10-20 20:54:28 +01:00
parent f6f4768b64
commit 83890f8d3a
3 changed files with 5 additions and 3 deletions

View File

@ -1243,7 +1243,7 @@ HTML_MESSAGE_BOX* SCH_TEXT::ShowSyntaxHelp( wxWindow* aParentWindow )
#include "sch_text_help_md.h" #include "sch_text_help_md.h"
; ;
HTML_MESSAGE_BOX* dlg = new HTML_MESSAGE_BOX( aParentWindow, _( "Syntax Help" ) ); HTML_MESSAGE_BOX* dlg = new HTML_MESSAGE_BOX( nullptr, _( "Syntax Help" ) );
dlg->SetDialogSizeInDU( 280, 280 ); dlg->SetDialogSizeInDU( 280, 280 );
wxString html_txt; wxString html_txt;

View File

@ -720,7 +720,8 @@ SCH_TEXT* SCH_DRAWING_TOOLS::createNewText( const VECTOR2I& aPosition, int aType
DIALOG_LABEL_EDITOR dlg( m_frame, textItem ); DIALOG_LABEL_EDITOR dlg( m_frame, textItem );
if( dlg.ShowModal() != wxID_OK || textItem->GetText().IsEmpty() ) // Must be quasi modal for syntax help
if( dlg.ShowQuasiModal() != wxID_OK || textItem->GetText().IsEmpty() )
{ {
delete textItem; delete textItem;
return nullptr; return nullptr;

View File

@ -1484,7 +1484,8 @@ int SCH_EDIT_TOOL::Properties( const TOOL_EVENT& aEvent )
{ {
DIALOG_LABEL_EDITOR dlg( m_frame, (SCH_TEXT*) item ); DIALOG_LABEL_EDITOR dlg( m_frame, (SCH_TEXT*) item );
if( dlg.ShowModal() == wxID_OK ) // Must be quasi modal for syntax help
if( dlg.ShowQuasiModal() == wxID_OK )
{ {
m_toolMgr->PostEvent( EVENTS::SelectedItemsModified ); m_toolMgr->PostEvent( EVENTS::SelectedItemsModified );
m_frame->OnModify(); m_frame->OnModify();