diff --git a/eeschema/dialogs/dialog_annotate.cpp b/eeschema/dialogs/dialog_annotate.cpp
index b439cc99e6..9b987bd362 100644
--- a/eeschema/dialogs/dialog_annotate.cpp
+++ b/eeschema/dialogs/dialog_annotate.cpp
@@ -44,6 +44,7 @@
class wxConfigBase;
+namespace {
/**
* Class DIALOG_ANNOTATE
@@ -51,7 +52,7 @@ class wxConfigBase;
class DIALOG_ANNOTATE: public DIALOG_ANNOTATE_BASE
{
public:
- DIALOG_ANNOTATE( SCH_EDIT_FRAME* parent );
+ DIALOG_ANNOTATE( SCH_EDIT_FRAME* parent, wxString message );
private:
@@ -96,12 +97,15 @@ private:
}
};
+} // anonymous namespace
-DIALOG_ANNOTATE::DIALOG_ANNOTATE( SCH_EDIT_FRAME* parent )
+DIALOG_ANNOTATE::DIALOG_ANNOTATE( SCH_EDIT_FRAME* parent, wxString message )
: DIALOG_ANNOTATE_BASE( parent )
{
m_Parent = parent;
+ m_userMessage->SetLabelText( message );
+ m_userMessage->Show( !message.empty() );
InitValues();
Layout();
@@ -310,9 +314,9 @@ int DIALOG_ANNOTATE::GetAnnotateAlgo()
}
-int InvokeDialogAnnotate( SCH_EDIT_FRAME* aCaller )
+int InvokeDialogAnnotate( SCH_EDIT_FRAME* aCaller, wxString message )
{
- DIALOG_ANNOTATE dlg( aCaller );
+ DIALOG_ANNOTATE dlg( aCaller, message );
return dlg.ShowModal();
}
diff --git a/eeschema/dialogs/dialog_annotate_base.cpp b/eeschema/dialogs/dialog_annotate_base.cpp
index 2e65004cd1..2ae59aac86 100644
--- a/eeschema/dialogs/dialog_annotate_base.cpp
+++ b/eeschema/dialogs/dialog_annotate_base.cpp
@@ -19,6 +19,12 @@ DIALOG_ANNOTATE_BASE::DIALOG_ANNOTATE_BASE( wxWindow* parent, wxWindowID id, con
wxBoxSizer* bupperSizer;
bupperSizer = new wxBoxSizer( wxVERTICAL );
+ m_userMessage = new wxStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ m_userMessage->Wrap( 1 );
+ m_userMessage->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ bupperSizer->Add( m_userMessage, 0, wxALL, 5 );
+
m_staticTextScope = new wxStaticText( this, wxID_ANY, _("Scope"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextScope->Wrap( -1 );
m_staticTextScope->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
diff --git a/eeschema/dialogs/dialog_annotate_base.fbp b/eeschema/dialogs/dialog_annotate_base.fbp
index 5742fbfdc6..bc759c0580 100644
--- a/eeschema/dialogs/dialog_annotate_base.fbp
+++ b/eeschema/dialogs/dialog_annotate_base.fbp
@@ -102,6 +102,89 @@
bupperSizer
wxVERTICAL
none
+
6
wxALL
diff --git a/eeschema/dialogs/dialog_annotate_base.h b/eeschema/dialogs/dialog_annotate_base.h
index 856903308e..6ab175168e 100644
--- a/eeschema/dialogs/dialog_annotate_base.h
+++ b/eeschema/dialogs/dialog_annotate_base.h
@@ -50,6 +50,7 @@ class DIALOG_ANNOTATE_BASE : public DIALOG_SHIM
private:
protected:
+ wxStaticText* m_userMessage;
wxStaticText* m_staticTextScope;
wxRadioButton* m_rbEntireSchematic;
wxRadioButton* m_rbCurrPage;
diff --git a/eeschema/invoke_sch_dialog.h b/eeschema/invoke_sch_dialog.h
index e4395ee2b3..fe36a41f79 100644
--- a/eeschema/invoke_sch_dialog.h
+++ b/eeschema/invoke_sch_dialog.h
@@ -66,7 +66,7 @@ int InvokeDialogRescueEach( SCH_EDIT_FRAME* aCaller, RESCUER& aRescuer, bool aAs
/// Create and show DIALOG_ANNOTATE and return whatever
/// DIALOG_ANNOTATE::ShowModal() returns.
-int InvokeDialogAnnotate( SCH_EDIT_FRAME* aCaller );
+int InvokeDialogAnnotate( SCH_EDIT_FRAME* aCaller, wxString message = "" );
/// Create the modeless DIALOG_ERC and show it, return something to
/// destroy or close it. The dialog will have ID_DIALOG_ERC from id.h
diff --git a/eeschema/netlist.cpp b/eeschema/netlist.cpp
index 671112bc9b..54f28c83ae 100644
--- a/eeschema/netlist.cpp
+++ b/eeschema/netlist.cpp
@@ -44,7 +44,7 @@
#include
#include
#include
-
+#include
#include
#define IS_WIRE false
@@ -63,13 +63,10 @@ bool SCH_EDIT_FRAME::prepareForNetlist()
// Performs some controls:
if( CheckAnnotate( NULL, 0 ) )
{
- if( !IsOK( NULL, _( "Some items are not annotated\n"
- "Do you want to annotate schematic?" ) ) )
- return false;
-
- // Schematic must be annotated: call Annotate dialog:
- wxCommandEvent event;
- OnAnnotate( event );
+ // Schematic must be annotated: call Annotate dialog and tell
+ // the user why that is.
+ InvokeDialogAnnotate( this, _( "Exporting the netlist requires a "
+ "completely\nannotated schematic." ) );
if( CheckAnnotate( NULL, 0 ) )
return false;