Eeschema: improve netlist generation useability.
* Eliminate modal annotation warning dialog when generating a netlist fails due to components that are not annotated. * Add warning message to annotate dialog.
This commit is contained in:
parent
c9d52c8894
commit
07d34e4428
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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 ) );
|
||||
|
|
|
@ -102,6 +102,89 @@
|
|||
<property name="name">bupperSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font">,90,92,-1,70,0</property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label"></property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_userMessage</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">1</property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">6</property>
|
||||
<property name="flag">wxALL</property>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
#include <sch_text.h>
|
||||
#include <sch_sheet.h>
|
||||
#include <algorithm>
|
||||
|
||||
#include <invoke_sch_dialog.h>
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
#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;
|
||||
|
|
Loading…
Reference in New Issue