diff --git a/eeschema/dialogs/panel_setup_formatting.cpp b/eeschema/dialogs/panel_setup_formatting.cpp
index 1637393a91..193264e575 100644
--- a/eeschema/dialogs/panel_setup_formatting.cpp
+++ b/eeschema/dialogs/panel_setup_formatting.cpp
@@ -41,6 +41,17 @@ PANEL_SETUP_FORMATTING::PANEL_SETUP_FORMATTING( wxWindow* aWindow, SCH_EDIT_FRAM
{
}
+void PANEL_SETUP_FORMATTING::onCheckBoxIref( wxCommandEvent& event )
+{
+ bool enabled = m_showIntersheetsReferences->GetValue();
+
+ m_radioFormatStandard->Enable( enabled );
+ m_radioFormatAbbreviated->Enable( enabled );
+ m_prefixCtrl->Enable( enabled );
+ m_suffixCtrl->Enable( enabled );
+ m_listOwnPage->Enable( enabled );
+}
+
bool PANEL_SETUP_FORMATTING::TransferDataToWindow()
{
@@ -70,10 +81,18 @@ bool PANEL_SETUP_FORMATTING::TransferDataToWindow()
m_choiceJunctionDotSize->SetSelection( settings.m_JunctionSizeChoice );
m_showIntersheetsReferences->SetValue( settings.m_IntersheetRefsShow );
+
+ m_radioFormatStandard->Enable( settings.m_IntersheetRefsShow );
+ m_radioFormatAbbreviated->Enable( settings.m_IntersheetRefsShow );
+ m_prefixCtrl->Enable( settings.m_IntersheetRefsShow );
+ m_suffixCtrl->Enable( settings.m_IntersheetRefsShow );
+ m_listOwnPage->Enable( settings.m_IntersheetRefsShow );
+
m_radioFormatStandard->SetValue( !settings.m_IntersheetRefsFormatShort );
m_radioFormatAbbreviated->SetValue( settings.m_IntersheetRefsFormatShort );
m_prefixCtrl->ChangeValue( settings.m_IntersheetRefsPrefix );
m_suffixCtrl->ChangeValue( settings.m_IntersheetRefsSuffix );
+ m_listOwnPage->SetValue( settings.m_IntersheetRefsListOwnPage );
wxString offsetRatio = wxString::Format( "%f", settings.m_TextOffsetRatio * 100.0 );
m_textOffsetRatioCtrl->SetValue( offsetRatio );
@@ -145,6 +164,7 @@ bool PANEL_SETUP_FORMATTING::TransferDataFromWindow()
settings.m_IntersheetRefsFormatShort = !m_radioFormatStandard->GetValue();
settings.m_IntersheetRefsPrefix = m_prefixCtrl->GetValue();
settings.m_IntersheetRefsSuffix = m_suffixCtrl->GetValue();
+ settings.m_IntersheetRefsListOwnPage = m_listOwnPage->GetValue();
double dtmp = 0.0;
wxString msg = m_textOffsetRatioCtrl->GetValue();
@@ -175,6 +195,7 @@ void PANEL_SETUP_FORMATTING::ImportSettingsFrom( SCHEMATIC_SETTINGS& aSettings )
m_radioFormatAbbreviated->SetValue( !aSettings.m_IntersheetRefsFormatShort );
m_prefixCtrl->ChangeValue( aSettings.m_IntersheetRefsPrefix );
m_suffixCtrl->ChangeValue( aSettings.m_IntersheetRefsSuffix );
+ m_listOwnPage->SetValue( aSettings.m_IntersheetRefsListOwnPage );
wxString offsetRatio = wxString::Format( "%f", aSettings.m_TextOffsetRatio * 100.0 );
m_textOffsetRatioCtrl->SetValue( offsetRatio );
diff --git a/eeschema/dialogs/panel_setup_formatting.h b/eeschema/dialogs/panel_setup_formatting.h
index 248db709c4..5da0250970 100644
--- a/eeschema/dialogs/panel_setup_formatting.h
+++ b/eeschema/dialogs/panel_setup_formatting.h
@@ -44,6 +44,9 @@ public:
bool TransferDataFromWindow() override;
void ImportSettingsFrom( SCHEMATIC_SETTINGS& aSettings );
+
+protected:
+ void onCheckBoxIref( wxCommandEvent& event ) override;
};
diff --git a/eeschema/dialogs/panel_setup_formatting_base.cpp b/eeschema/dialogs/panel_setup_formatting_base.cpp
index 524f0a248f..a4c3bf5a68 100644
--- a/eeschema/dialogs/panel_setup_formatting_base.cpp
+++ b/eeschema/dialogs/panel_setup_formatting_base.cpp
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version 3.9.0 Nov 1 2020)
+// C++ code generated with wxFormBuilder (version 3.9.0 Mar 8 2021)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -9,6 +9,10 @@
///////////////////////////////////////////////////////////////////////////
+BEGIN_EVENT_TABLE( PANEL_SETUP_FORMATTING_BASE, wxPanel )
+ EVT_CHECKBOX( wxID_ANY, PANEL_SETUP_FORMATTING_BASE::_wxFB_onCheckBoxIref )
+END_EVENT_TABLE()
+
PANEL_SETUP_FORMATTING_BASE::PANEL_SETUP_FORMATTING_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
{
wxBoxSizer* bPanelSizer;
@@ -152,6 +156,10 @@ PANEL_SETUP_FORMATTING_BASE::PANEL_SETUP_FORMATTING_BASE( wxWindow* parent, wxWi
wxBoxSizer* bSizerMargins;
bSizerMargins = new wxBoxSizer( wxVERTICAL );
+ m_listOwnPage = new wxCheckBox( sbSizerIREf->GetStaticBox(), wxID_ANY, _("Show own page reference"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_listOwnPage->SetValue(true);
+ bSizerMargins->Add( m_listOwnPage, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
+
m_radioFormatStandard = new wxRadioButton( sbSizerIREf->GetStaticBox(), wxID_ANY, _("Standard (1,2,3)"), wxDefaultPosition, wxDefaultSize, 0 );
m_radioFormatStandard->SetValue( true );
bSizerMargins->Add( m_radioFormatStandard, 0, wxALL, 5 );
diff --git a/eeschema/dialogs/panel_setup_formatting_base.fbp b/eeschema/dialogs/panel_setup_formatting_base.fbp
index ec4fb55fb6..04d61d7469 100644
--- a/eeschema/dialogs/panel_setup_formatting_base.fbp
+++ b/eeschema/dialogs/panel_setup_formatting_base.fbp
@@ -1258,6 +1258,7 @@
+ onCheckBoxIref