diff --git a/common/widgets/wx_html_report_panel_base.cpp b/common/widgets/wx_html_report_panel_base.cpp
index 257843db0f..a5d041e148 100644
--- a/common/widgets/wx_html_report_panel_base.cpp
+++ b/common/widgets/wx_html_report_panel_base.cpp
@@ -39,6 +39,7 @@ WX_HTML_REPORT_PANEL_BASE::WX_HTML_REPORT_PANEL_BASE( wxWindow* parent, wxWindow
bSizerBottom->Add( 30, 0, 0, wxEXPAND, 5 );
m_checkBoxShowErrors = new wxCheckBox( m_box->GetStaticBox(), wxID_ANY, _("Errors"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_checkBoxShowErrors->SetValue(true);
bSizerBottom->Add( m_checkBoxShowErrors, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
m_errorsBadge = new NUMBER_BADGE( m_box->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
@@ -50,6 +51,7 @@ WX_HTML_REPORT_PANEL_BASE::WX_HTML_REPORT_PANEL_BASE( wxWindow* parent, wxWindow
bSizerBottom->Add( 25, 0, 0, wxEXPAND, 5 );
m_checkBoxShowWarnings = new wxCheckBox( m_box->GetStaticBox(), wxID_ANY, _("Warnings"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_checkBoxShowWarnings->SetValue(true);
bSizerBottom->Add( m_checkBoxShowWarnings, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
m_warningsBadge = new NUMBER_BADGE( m_box->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
@@ -61,12 +63,14 @@ WX_HTML_REPORT_PANEL_BASE::WX_HTML_REPORT_PANEL_BASE( wxWindow* parent, wxWindow
bSizerBottom->Add( 25, 0, 0, wxEXPAND, 5 );
m_checkBoxShowActions = new wxCheckBox( m_box->GetStaticBox(), wxID_ANY, _("Actions"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_checkBoxShowActions->SetValue(true);
bSizerBottom->Add( m_checkBoxShowActions, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
bSizerBottom->Add( 30, 0, 0, wxEXPAND, 5 );
m_checkBoxShowInfos = new wxCheckBox( m_box->GetStaticBox(), wxID_ANY, _("Infos"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_checkBoxShowInfos->SetValue(true);
bSizerBottom->Add( m_checkBoxShowInfos, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
diff --git a/common/widgets/wx_html_report_panel_base.fbp b/common/widgets/wx_html_report_panel_base.fbp
index 34ebe82d1b..78596b2c90 100644
--- a/common/widgets/wx_html_report_panel_base.fbp
+++ b/common/widgets/wx_html_report_panel_base.fbp
@@ -304,7 +304,7 @@
1
0
- 0
+ 1
1
1
@@ -443,7 +443,7 @@
1
0
- 0
+ 1
1
1
@@ -582,7 +582,7 @@
1
0
- 0
+ 1
1
1
@@ -658,7 +658,7 @@
1
0
- 0
+ 1
1
1
diff --git a/eeschema/dialogs/dialog_annotate.cpp b/eeschema/dialogs/dialog_annotate.cpp
index 54a612d0a3..499c9e39ae 100644
--- a/eeschema/dialogs/dialog_annotate.cpp
+++ b/eeschema/dialogs/dialog_annotate.cpp
@@ -45,34 +45,56 @@ public:
DIALOG_ANNOTATE( SCH_EDIT_FRAME* parent, const wxString& message );
~DIALOG_ANNOTATE();
+ bool TransferDataToWindow() override;
+
private:
/// Initialize member variables.
- void InitValues();
void OnOptionChanged( wxCommandEvent& event ) override;
void OnClearAnnotationClick( wxCommandEvent& event ) override;
void OnCloseClick( wxCommandEvent& event ) override;
void OnClose( wxCloseEvent& event ) override;
void OnAnnotateClick( wxCommandEvent& event ) override;
- // User functions:
- bool GetResetItems();
+ ANNOTATE_SCOPE_T GetScope()
+ {
+ if( m_rbScope_Schematic->GetValue() )
+ return ANNOTATE_ALL;
+ else if( m_rbScope_Sheet->GetValue() )
+ return ANNOTATE_CURRENT_SHEET;
+ else
+ return ANNOTATE_SELECTION;
+ }
- ANNOTATE_SCOPE_T GetScope();
+ ANNOTATE_ORDER_T GetSortOrder()
+ {
+ if( m_rbSortBy_Y_Position->GetValue() )
+ return SORT_BY_Y_POSITION;
+ else
+ return SORT_BY_X_POSITION;
+ }
- bool GetRecursive();
+ ANNOTATE_ALGO_T GetAnnotateAlgo()
+ {
+ if( m_rbSheetX100->GetValue() )
+ return SHEET_NUMBER_X_100;
+ else if( m_rbSheetX1000->GetValue() )
+ return SHEET_NUMBER_X_1000;
+ else
+ return INCREMENTAL_BY_REF;
+ }
- ANNOTATE_ORDER_T GetSortOrder();
-
- ANNOTATE_ALGO_T GetAnnotateAlgo();
-
- int GetStartNumber();
+ int GetStartNumber()
+ {
+ return (int) EDA_UNIT_UTILS::UI::ValueFromString( m_textNumberAfter->GetValue() );
+ }
+private:
SCH_EDIT_FRAME* m_Parent;
};
-DIALOG_ANNOTATE::DIALOG_ANNOTATE( SCH_EDIT_FRAME* parent, const wxString& message )
- : DIALOG_ANNOTATE_BASE( parent )
+DIALOG_ANNOTATE::DIALOG_ANNOTATE( SCH_EDIT_FRAME* parent, const wxString& message ) :
+ DIALOG_ANNOTATE_BASE( parent )
{
SetName( DLG_WINDOW_NAME );
m_Parent = parent;
@@ -92,7 +114,11 @@ DIALOG_ANNOTATE::DIALOG_ANNOTATE( SCH_EDIT_FRAME* parent, const wxString& messag
SetupStandardButtons( { { wxID_OK, _( "Annotate" ) },
{ wxID_CANCEL, _( "Close" ) } } );
- InitValues();
+ annotate_down_right_bitmap->SetBitmap( KiBitmapBundle( BITMAPS::annotate_down_right ) );
+ annotate_right_down_bitmap->SetBitmap( KiBitmapBundle( BITMAPS::annotate_right_down ) );
+
+ m_MessageWindow->MsgPanelSetMinSize( wxSize( -1, 160 ) );
+
Layout();
// When all widgets have the size fixed, call FinishDialogSettings
@@ -102,7 +128,7 @@ DIALOG_ANNOTATE::DIALOG_ANNOTATE( SCH_EDIT_FRAME* parent, const wxString& messag
DIALOG_ANNOTATE::~DIALOG_ANNOTATE()
{
- auto cfg = static_cast( Kiface().KifaceSettings() );
+ EESCHEMA_SETTINGS* cfg = static_cast( Kiface().KifaceSettings() );
cfg->m_AnnotatePanel.sort_order = GetSortOrder();
cfg->m_AnnotatePanel.method = GetAnnotateAlgo();
@@ -111,16 +137,15 @@ DIALOG_ANNOTATE::~DIALOG_ANNOTATE()
if( m_rbScope_Schematic->IsEnabled() )
{
cfg->m_AnnotatePanel.scope = GetScope();
- cfg->m_AnnotatePanel.recursive = GetRecursive();
+ cfg->m_AnnotatePanel.recursive = m_checkRecursive->GetValue();
}
cfg->m_AnnotatePanel.messages_filter = m_MessageWindow->GetVisibleSeverities();
// Get the "start annotation after" value from dialog and update project settings if changed
int startNum = GetStartNumber();
- SCH_EDIT_FRAME* schFrame = dynamic_cast( m_parentFrame );
- if( schFrame )
+ if( SCH_EDIT_FRAME* schFrame = dynamic_cast( m_parentFrame ) )
{
SCHEMATIC_SETTINGS& projSettings = schFrame->Schematic().Settings();
@@ -137,10 +162,9 @@ DIALOG_ANNOTATE::~DIALOG_ANNOTATE()
}
-void DIALOG_ANNOTATE::InitValues()
+bool DIALOG_ANNOTATE::TransferDataToWindow()
{
EESCHEMA_SETTINGS* cfg = static_cast( Kiface().KifaceSettings() );
- int option;
if( m_rbScope_Schematic->IsEnabled() )
{
@@ -155,21 +179,16 @@ void DIALOG_ANNOTATE::InitValues()
m_checkRecursive->SetValue( cfg->m_AnnotatePanel.recursive );
}
-
m_rbOptions->SetSelection( cfg->m_AnnotatePanel.options );
- option = cfg->m_AnnotatePanel.sort_order;
-
- switch( option )
+ switch( cfg->m_AnnotatePanel.sort_order )
{
default:
case SORT_BY_X_POSITION: m_rbSortBy_X_Position->SetValue( true ); break;
case SORT_BY_Y_POSITION: m_rbSortBy_Y_Position->SetValue( true ); break;
}
- option = cfg->m_AnnotatePanel.method;
-
- switch( option )
+ switch( cfg->m_AnnotatePanel.method )
{
default:
case INCREMENTAL_BY_REF: m_rbFirstFree->SetValue( true ); break;
@@ -180,9 +199,7 @@ void DIALOG_ANNOTATE::InitValues()
int annotateStartNum = 0; // Default "start after" value for annotation
// See if we can get a "start after" value from the project settings
- SCH_EDIT_FRAME* schFrame = dynamic_cast( m_parentFrame );
-
- if( schFrame )
+ if( SCH_EDIT_FRAME* schFrame = dynamic_cast( m_parentFrame ) )
{
SCHEMATIC_SETTINGS& projSettings = schFrame->Schematic().Settings();
annotateStartNum = projSettings.m_AnnotateStartNum;
@@ -190,10 +207,7 @@ void DIALOG_ANNOTATE::InitValues()
m_textNumberAfter->SetValue( wxString::Format( wxT( "%d" ), annotateStartNum ) );
- annotate_down_right_bitmap->SetBitmap( KiBitmapBundle( BITMAPS::annotate_down_right ) );
- annotate_right_down_bitmap->SetBitmap( KiBitmapBundle( BITMAPS::annotate_right_down ) );
-
- m_MessageWindow->MsgPanelSetMinSize( wxSize( -1, 160 ) );
+ return true;
}
@@ -218,8 +232,8 @@ void DIALOG_ANNOTATE::OnAnnotateClick( wxCommandEvent& event )
REPORTER& reporter = m_MessageWindow->Reporter();
m_MessageWindow->SetLazyUpdate( true ); // Don't update after each message
- m_Parent->AnnotateSymbols( &commit, GetScope(), GetSortOrder(), GetAnnotateAlgo(),
- GetRecursive(), GetStartNumber(), GetResetItems(), true, reporter );
+ m_Parent->AnnotateSymbols( &commit, GetScope(), GetSortOrder(), GetAnnotateAlgo(), m_checkRecursive->GetValue(),
+ GetStartNumber(), m_rbOptions->GetSelection() >= 1, true, reporter );
commit.Push( _( "Annotate" ) );
@@ -230,7 +244,7 @@ void DIALOG_ANNOTATE::OnAnnotateClick( wxCommandEvent& event )
void DIALOG_ANNOTATE::OnClearAnnotationClick( wxCommandEvent& event )
{
m_MessageWindow->Clear();
- m_Parent->DeleteAnnotation( GetScope(), GetRecursive(), m_MessageWindow->Reporter() );
+ m_Parent->DeleteAnnotation( GetScope(), m_checkRecursive->GetValue(), m_MessageWindow->Reporter() );
m_MessageWindow->Flush( true ); // Now update to show all messages
}
@@ -243,59 +257,9 @@ void DIALOG_ANNOTATE::OnOptionChanged( wxCommandEvent& event )
}
-bool DIALOG_ANNOTATE::GetResetItems()
-{
- return m_rbOptions->GetSelection() >= 1;
-}
-
-
-ANNOTATE_SCOPE_T DIALOG_ANNOTATE::GetScope()
-{
- if( m_rbScope_Schematic->GetValue() )
- return ANNOTATE_ALL;
- else if( m_rbScope_Sheet->GetValue() )
- return ANNOTATE_CURRENT_SHEET;
- else
- return ANNOTATE_SELECTION;
-}
-
-
-bool DIALOG_ANNOTATE::GetRecursive()
-{
- return m_checkRecursive->GetValue();
-}
-
-
-ANNOTATE_ORDER_T DIALOG_ANNOTATE::GetSortOrder()
-{
- if( m_rbSortBy_Y_Position->GetValue() )
- return SORT_BY_Y_POSITION;
- else
- return SORT_BY_X_POSITION;
-}
-
-
-ANNOTATE_ALGO_T DIALOG_ANNOTATE::GetAnnotateAlgo()
-{
- if( m_rbSheetX100->GetValue() )
- return SHEET_NUMBER_X_100;
- else if( m_rbSheetX1000->GetValue() )
- return SHEET_NUMBER_X_1000;
- else
- return INCREMENTAL_BY_REF;
-}
-
-
-int DIALOG_ANNOTATE::GetStartNumber()
-{
- return EDA_UNIT_UTILS::UI::ValueFromString( m_textNumberAfter->GetValue() );
-}
-
-
void SCH_EDIT_FRAME::OnAnnotate()
{
- DIALOG_ANNOTATE* dlg =
- static_cast( wxWindow::FindWindowByName( DLG_WINDOW_NAME ) );
+ DIALOG_ANNOTATE* dlg = static_cast( wxWindow::FindWindowByName( DLG_WINDOW_NAME ) );
if( !dlg )
{
diff --git a/eeschema/dialogs/dialog_annotate_base.cpp b/eeschema/dialogs/dialog_annotate_base.cpp
index cf7812d45b..55c2544aaf 100644
--- a/eeschema/dialogs/dialog_annotate_base.cpp
+++ b/eeschema/dialogs/dialog_annotate_base.cpp
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf-dirty)
+// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -40,6 +40,7 @@ DIALOG_ANNOTATE_BASE::DIALOG_ANNOTATE_BASE( wxWindow* parent, wxWindowID id, con
sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Scope") ), wxVERTICAL );
m_rbScope_Schematic = new wxRadioButton( sbSizer3->GetStaticBox(), wxID_ANY, _("Entire schematic"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
+ m_rbScope_Schematic->SetValue( true );
sbSizer3->Add( m_rbScope_Schematic, 0, wxLEFT|wxRIGHT, 5 );
m_rbScope_Sheet = new wxRadioButton( sbSizer3->GetStaticBox(), wxID_ANY, _("Current sheet only"), wxDefaultPosition, wxDefaultSize, 0 );
@@ -49,6 +50,7 @@ DIALOG_ANNOTATE_BASE::DIALOG_ANNOTATE_BASE( wxWindow* parent, wxWindowID id, con
sbSizer3->Add( m_rbScope_Selection, 0, wxLEFT|wxRIGHT|wxBOTTOM, 5 );
m_checkRecursive = new wxCheckBox( sbSizer3->GetStaticBox(), wxID_ANY, _("Recurse into subsheets"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_checkRecursive->SetValue(true);
sbSizer3->Add( m_checkRecursive, 0, wxALL, 5 );
@@ -61,6 +63,7 @@ DIALOG_ANNOTATE_BASE::DIALOG_ANNOTATE_BASE( wxWindow* parent, wxWindowID id, con
bSizerXpos = new wxBoxSizer( wxHORIZONTAL );
m_rbSortBy_X_Position = new wxRadioButton( sbSizer1->GetStaticBox(), ID_SORT_BY_X_POSITION, _("Sort symbols by &X position"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
+ m_rbSortBy_X_Position->SetValue( true );
bSizerXpos->Add( m_rbSortBy_X_Position, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
annotate_down_right_bitmap = new wxStaticBitmap( sbSizer1->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
@@ -99,6 +102,7 @@ DIALOG_ANNOTATE_BASE::DIALOG_ANNOTATE_BASE( wxWindow* parent, wxWindowID id, con
gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_rbFirstFree = new wxRadioButton( sbSizer2->GetStaticBox(), wxID_FIRST_FREE, _("Use first free number after:"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
+ m_rbFirstFree->SetValue( true );
gbSizer1->Add( m_rbFirstFree, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 2 );
m_textNumberAfter = new wxTextCtrl( sbSizer2->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 60,-1 ), 0 );
diff --git a/eeschema/dialogs/dialog_annotate_base.fbp b/eeschema/dialogs/dialog_annotate_base.fbp
index fa626f1240..27d60ae120 100644
--- a/eeschema/dialogs/dialog_annotate_base.fbp
+++ b/eeschema/dialogs/dialog_annotate_base.fbp
@@ -1,34 +1,36 @@
-
+