Move a couple more dialogs to QuasiModal for syntax help.
Fixes https://gitlab.com/kicad/code/kicad/issues/5897
This commit is contained in:
parent
66d2cf172d
commit
1d110d5414
|
@ -65,8 +65,6 @@ set( EESCHEMA_DLGS
|
|||
dialogs/dialog_edit_line_style.cpp
|
||||
dialogs/dialog_edit_line_style_base.cpp
|
||||
dialogs/dialog_edit_one_field.cpp
|
||||
dialogs/dialog_edit_sheet_pin.cpp
|
||||
dialogs/dialog_edit_sheet_pin_base.cpp
|
||||
dialogs/dialog_erc.cpp
|
||||
dialogs/dialog_erc_base.cpp
|
||||
dialogs/dialog_global_sym_lib_table_config.cpp
|
||||
|
@ -96,9 +94,10 @@ set( EESCHEMA_DLGS
|
|||
dialogs/dialog_print_using_printer_base.cpp
|
||||
dialogs/dialog_rescue_each.cpp
|
||||
dialogs/dialog_rescue_each_base.cpp
|
||||
dialogs/dialog_edit_sheet_pin.cpp
|
||||
dialogs/dialog_sch_import_settings.cpp
|
||||
dialogs/dialog_sch_import_settings_base.cpp
|
||||
dialogs/dialog_sheet_pin_properties.cpp
|
||||
dialogs/dialog_sheet_pin_properties_base.cpp
|
||||
dialogs/dialog_sheet_properties.cpp
|
||||
dialogs/dialog_sheet_properties_base.cpp
|
||||
dialogs/dialog_schematic_find.cpp
|
||||
|
|
|
@ -217,7 +217,9 @@ private:
|
|||
int InvokeDialogCreateBOM( SCH_EDIT_FRAME* aCaller )
|
||||
{
|
||||
DIALOG_BOM dlg( aCaller );
|
||||
return dlg.ShowModal();
|
||||
|
||||
// QuasiModal so syntax help works
|
||||
return dlg.ShowQuasiModal();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include <sch_edit_frame.h>
|
||||
#include <sch_sheet.h>
|
||||
#include <sch_validators.h>
|
||||
#include <dialog_edit_sheet_pin.h>
|
||||
#include <dialog_sheet_pin_properties.h>
|
||||
#include <dialogs/html_messagebox.h>
|
||||
#include <kicad_string.h>
|
||||
|
||||
|
@ -40,8 +40,8 @@ static wxString sheetPinTypes[] =
|
|||
};
|
||||
|
||||
|
||||
DIALOG_EDIT_SHEET_PIN::DIALOG_EDIT_SHEET_PIN( SCH_EDIT_FRAME* parent, SCH_SHEET_PIN* aPin ) :
|
||||
DIALOG_EDIT_SHEET_PIN_BASE( parent ),
|
||||
DIALOG_SHEET_PIN_PROPERTIES::DIALOG_SHEET_PIN_PROPERTIES( SCH_EDIT_FRAME* parent, SCH_SHEET_PIN* aPin ) :
|
||||
DIALOG_SHEET_PIN_PROPERTIES_BASE( parent ),
|
||||
m_frame( parent ),
|
||||
m_sheetPin( aPin ),
|
||||
m_textSize( parent, m_textSizeLabel, m_textSizeCtrl, m_textSizeUnits, true ),
|
||||
|
@ -77,14 +77,14 @@ DIALOG_EDIT_SHEET_PIN::DIALOG_EDIT_SHEET_PIN( SCH_EDIT_FRAME* parent, SCH_SHEET_
|
|||
}
|
||||
|
||||
|
||||
DIALOG_EDIT_SHEET_PIN::~DIALOG_EDIT_SHEET_PIN()
|
||||
DIALOG_SHEET_PIN_PROPERTIES::~DIALOG_SHEET_PIN_PROPERTIES()
|
||||
{
|
||||
if( m_helpWindow )
|
||||
m_helpWindow->Destroy();
|
||||
}
|
||||
|
||||
|
||||
bool DIALOG_EDIT_SHEET_PIN::TransferDataToWindow()
|
||||
bool DIALOG_SHEET_PIN_PROPERTIES::TransferDataToWindow()
|
||||
{
|
||||
SCH_SCREEN* screen = m_sheetPin->GetParent()->GetScreen();
|
||||
|
||||
|
@ -104,7 +104,7 @@ bool DIALOG_EDIT_SHEET_PIN::TransferDataToWindow()
|
|||
}
|
||||
|
||||
|
||||
bool DIALOG_EDIT_SHEET_PIN::TransferDataFromWindow()
|
||||
bool DIALOG_SHEET_PIN_PROPERTIES::TransferDataFromWindow()
|
||||
{
|
||||
if( !m_sheetPin->IsNew() )
|
||||
{
|
||||
|
@ -128,19 +128,19 @@ bool DIALOG_EDIT_SHEET_PIN::TransferDataFromWindow()
|
|||
}
|
||||
|
||||
|
||||
void DIALOG_EDIT_SHEET_PIN::onOKButton( wxCommandEvent& event )
|
||||
void DIALOG_SHEET_PIN_PROPERTIES::onOKButton( wxCommandEvent& event )
|
||||
{
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_EDIT_SHEET_PIN::OnSyntaxHelp( wxHyperlinkEvent& aEvent )
|
||||
void DIALOG_SHEET_PIN_PROPERTIES::OnSyntaxHelp( wxHyperlinkEvent& aEvent )
|
||||
{
|
||||
m_helpWindow = SCH_TEXT::ShowSyntaxHelp( this );
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_EDIT_SHEET_PIN::onComboBox( wxCommandEvent& aEvent )
|
||||
void DIALOG_SHEET_PIN_PROPERTIES::onComboBox( wxCommandEvent& aEvent )
|
||||
{
|
||||
SCH_SCREEN* screen = m_sheetPin->GetParent()->GetScreen();
|
||||
|
|
@ -22,11 +22,11 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef DIALOG_EDIT_SHEET_PIN_H
|
||||
#define DIALOG_EDIT_SHEET_PIN_H
|
||||
#ifndef DIALOG_SHEET_PIN_PROPERTIES_H
|
||||
#define DIALOG_SHEET_PIN_PROPERTIES_H
|
||||
|
||||
|
||||
#include <dialog_edit_sheet_pin_base.h>
|
||||
#include <dialog_sheet_pin_properties_base.h>
|
||||
#include <widgets/unit_binder.h>
|
||||
|
||||
|
||||
|
@ -34,7 +34,7 @@ class SCH_SHEET_PIN;
|
|||
class HTML_MESSAGE_BOX;
|
||||
|
||||
|
||||
class DIALOG_EDIT_SHEET_PIN : public DIALOG_EDIT_SHEET_PIN_BASE
|
||||
class DIALOG_SHEET_PIN_PROPERTIES : public DIALOG_SHEET_PIN_PROPERTIES_BASE
|
||||
{
|
||||
SCH_EDIT_FRAME* m_frame;
|
||||
SCH_SHEET_PIN* m_sheetPin;
|
||||
|
@ -44,8 +44,8 @@ class DIALOG_EDIT_SHEET_PIN : public DIALOG_EDIT_SHEET_PIN_BASE
|
|||
HTML_MESSAGE_BOX* m_helpWindow;
|
||||
|
||||
public:
|
||||
DIALOG_EDIT_SHEET_PIN( SCH_EDIT_FRAME* parent, SCH_SHEET_PIN* aPin );
|
||||
~DIALOG_EDIT_SHEET_PIN();
|
||||
DIALOG_SHEET_PIN_PROPERTIES( SCH_EDIT_FRAME* parent, SCH_SHEET_PIN* aPin );
|
||||
~DIALOG_SHEET_PIN_PROPERTIES();
|
||||
|
||||
bool TransferDataToWindow() override;
|
||||
bool TransferDataFromWindow() override;
|
||||
|
@ -56,4 +56,4 @@ private:
|
|||
void onComboBox( wxCommandEvent& event ) override;
|
||||
};
|
||||
|
||||
#endif // DIALOG_EDIT_SHEET_PIN_H
|
||||
#endif // DIALOG_SHEET_PIN_PROPERTIES_H
|
|
@ -5,11 +5,11 @@
|
|||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "dialog_edit_sheet_pin_base.h"
|
||||
#include "dialog_sheet_pin_properties_base.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
DIALOG_EDIT_SHEET_PIN_BASE::DIALOG_EDIT_SHEET_PIN_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
|
||||
DIALOG_SHEET_PIN_PROPERTIES_BASE::DIALOG_SHEET_PIN_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
|
||||
{
|
||||
this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
|
||||
|
||||
|
@ -101,16 +101,16 @@ DIALOG_EDIT_SHEET_PIN_BASE::DIALOG_EDIT_SHEET_PIN_BASE( wxWindow* parent, wxWind
|
|||
this->Centre( wxBOTH );
|
||||
|
||||
// Connect Events
|
||||
m_comboName->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_EDIT_SHEET_PIN_BASE::onComboBox ), NULL, this );
|
||||
m_hyperlink1->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( DIALOG_EDIT_SHEET_PIN_BASE::OnSyntaxHelp ), NULL, this );
|
||||
m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_SHEET_PIN_BASE::onOKButton ), NULL, this );
|
||||
m_comboName->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_SHEET_PIN_PROPERTIES_BASE::onComboBox ), NULL, this );
|
||||
m_hyperlink1->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( DIALOG_SHEET_PIN_PROPERTIES_BASE::OnSyntaxHelp ), NULL, this );
|
||||
m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PIN_PROPERTIES_BASE::onOKButton ), NULL, this );
|
||||
}
|
||||
|
||||
DIALOG_EDIT_SHEET_PIN_BASE::~DIALOG_EDIT_SHEET_PIN_BASE()
|
||||
DIALOG_SHEET_PIN_PROPERTIES_BASE::~DIALOG_SHEET_PIN_PROPERTIES_BASE()
|
||||
{
|
||||
// Disconnect Events
|
||||
m_comboName->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_EDIT_SHEET_PIN_BASE::onComboBox ), NULL, this );
|
||||
m_hyperlink1->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( DIALOG_EDIT_SHEET_PIN_BASE::OnSyntaxHelp ), NULL, this );
|
||||
m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_SHEET_PIN_BASE::onOKButton ), NULL, this );
|
||||
m_comboName->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_SHEET_PIN_PROPERTIES_BASE::onComboBox ), NULL, this );
|
||||
m_hyperlink1->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( DIALOG_SHEET_PIN_PROPERTIES_BASE::OnSyntaxHelp ), NULL, this );
|
||||
m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PIN_PROPERTIES_BASE::onOKButton ), NULL, this );
|
||||
|
||||
}
|
|
@ -11,12 +11,12 @@
|
|||
<property name="embedded_files_path">res</property>
|
||||
<property name="encoding">UTF-8</property>
|
||||
<property name="event_generation">connect</property>
|
||||
<property name="file">dialog_edit_sheet_pin_base</property>
|
||||
<property name="file">dialog_sheet_pin_properties_base</property>
|
||||
<property name="first_id">1000</property>
|
||||
<property name="help_provider">none</property>
|
||||
<property name="indent_with_spaces"></property>
|
||||
<property name="internationalize">1</property>
|
||||
<property name="name">dialog_edit_sheet_pin</property>
|
||||
<property name="name">dialog_sheet_pin_properties</property>
|
||||
<property name="namespace"></property>
|
||||
<property name="path">.</property>
|
||||
<property name="precompiled_header"></property>
|
||||
|
@ -43,7 +43,7 @@
|
|||
<property name="id">wxID_ANY</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size">-1,-1</property>
|
||||
<property name="name">DIALOG_EDIT_SHEET_PIN_BASE</property>
|
||||
<property name="name">DIALOG_SHEET_PIN_PROPERTIES_BASE</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size">-1,-1</property>
|
||||
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
|
@ -30,9 +30,9 @@
|
|||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class DIALOG_EDIT_SHEET_PIN_BASE
|
||||
/// Class DIALOG_SHEET_PIN_PROPERTIES_BASE
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class DIALOG_EDIT_SHEET_PIN_BASE : public DIALOG_SHIM
|
||||
class DIALOG_SHEET_PIN_PROPERTIES_BASE : public DIALOG_SHIM
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -59,8 +59,8 @@ class DIALOG_EDIT_SHEET_PIN_BASE : public DIALOG_SHIM
|
|||
|
||||
public:
|
||||
|
||||
DIALOG_EDIT_SHEET_PIN_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Sheet Pin Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~DIALOG_EDIT_SHEET_PIN_BASE();
|
||||
DIALOG_SHEET_PIN_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Sheet Pin Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~DIALOG_SHEET_PIN_PROPERTIES_BASE();
|
||||
|
||||
};
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
#include <schematic.h>
|
||||
#include <symbol_lib_table.h>
|
||||
#include <dialogs/dialog_sheet_properties.h>
|
||||
#include <dialogs/dialog_edit_sheet_pin.h>
|
||||
#include <dialogs/dialog_sheet_pin_properties.h>
|
||||
#include <tool/actions.h>
|
||||
|
||||
|
||||
|
@ -498,7 +498,7 @@ SCH_SHEET_PIN* SCH_EDIT_FRAME::CreateSheetPin( SCH_SHEET* aSheet, SCH_HIERLABEL*
|
|||
|
||||
if( !aLabel )
|
||||
{
|
||||
DIALOG_EDIT_SHEET_PIN dlg( this, sheetPin );
|
||||
DIALOG_SHEET_PIN_PROPERTIES dlg( this, sheetPin );
|
||||
|
||||
if( dlg.ShowModal() != wxID_OK || sheetPin->GetText().IsEmpty() )
|
||||
{
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
#include <dialogs/dialog_image_editor.h>
|
||||
#include <dialogs/dialog_edit_line_style.h>
|
||||
#include <dialogs/dialog_symbol_properties.h>
|
||||
#include <dialogs/dialog_edit_sheet_pin.h>
|
||||
#include <dialogs/dialog_sheet_pin_properties.h>
|
||||
#include <dialogs/dialog_edit_one_field.h>
|
||||
#include <dialogs/dialog_junction_props.h>
|
||||
#include "sch_drawing_tools.h"
|
||||
|
@ -1484,10 +1484,11 @@ int SCH_EDIT_TOOL::Properties( const TOOL_EVENT& aEvent )
|
|||
|
||||
case SCH_SHEET_PIN_T:
|
||||
{
|
||||
SCH_SHEET_PIN* pin = (SCH_SHEET_PIN*) item;
|
||||
DIALOG_EDIT_SHEET_PIN dlg( m_frame, pin );
|
||||
SCH_SHEET_PIN* pin = (SCH_SHEET_PIN*) item;
|
||||
DIALOG_SHEET_PIN_PROPERTIES dlg( m_frame, pin );
|
||||
|
||||
if( dlg.ShowModal() == wxID_OK )
|
||||
// QuasiModal required for help dialog
|
||||
if( dlg.ShowQuasiModal() == wxID_OK )
|
||||
{
|
||||
m_toolMgr->PostEvent( EVENTS::SelectedItemsModified );
|
||||
m_frame->OnModify();
|
||||
|
|
Loading…
Reference in New Issue