From 83890f8d3a0c00211c20c0724926755aabe7c3cd Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Tue, 20 Oct 2020 20:54:28 +0100 Subject: [PATCH] Move label editors to QuasiModal so the Syntax Help window can be shown. Fixes https://gitlab.com/kicad/code/kicad/issues/5437 --- eeschema/sch_text.cpp | 2 +- eeschema/tools/sch_drawing_tools.cpp | 3 ++- eeschema/tools/sch_edit_tool.cpp | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/eeschema/sch_text.cpp b/eeschema/sch_text.cpp index 228106a9f1..49ff4395f8 100644 --- a/eeschema/sch_text.cpp +++ b/eeschema/sch_text.cpp @@ -1243,7 +1243,7 @@ HTML_MESSAGE_BOX* SCH_TEXT::ShowSyntaxHelp( wxWindow* aParentWindow ) #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 ); wxString html_txt; diff --git a/eeschema/tools/sch_drawing_tools.cpp b/eeschema/tools/sch_drawing_tools.cpp index 5e9b5cd288..01da9441f1 100644 --- a/eeschema/tools/sch_drawing_tools.cpp +++ b/eeschema/tools/sch_drawing_tools.cpp @@ -720,7 +720,8 @@ SCH_TEXT* SCH_DRAWING_TOOLS::createNewText( const VECTOR2I& aPosition, int aType 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; return nullptr; diff --git a/eeschema/tools/sch_edit_tool.cpp b/eeschema/tools/sch_edit_tool.cpp index 8ab828518f..798eba6463 100644 --- a/eeschema/tools/sch_edit_tool.cpp +++ b/eeschema/tools/sch_edit_tool.cpp @@ -1484,7 +1484,8 @@ int SCH_EDIT_TOOL::Properties( const TOOL_EVENT& aEvent ) { 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_frame->OnModify();