Eeschema: minor enhancement: When a netlist is created and a component is not yet annotated, the annotate dialog is called from the netlist dialog

(no need to close the netlist dialog, open  the annotated dialog and reopen the netlist dialog).
This commit is contained in:
jean-pierre charras 2011-01-10 18:47:50 +01:00
parent a3a73ef5dd
commit f34926be10
2 changed files with 10 additions and 3 deletions

View File

@ -26,6 +26,7 @@
#include "sch_sheet.h" #include "sch_sheet.h"
#include "dialog_helpers.h" #include "dialog_helpers.h"
#include "netlist_control.h" #include "netlist_control.h"
#include "dialogs/annotate_dialog.h"
//Imported function: //Imported function:
@ -523,7 +524,13 @@ bool SCH_EDIT_FRAME::CreateNetlist( int aFormat, const wxString& aFullFileName,
// Performs some controls: // Performs some controls:
if( CheckAnnotate( NULL, 0 ) ) if( CheckAnnotate( NULL, 0 ) )
{ {
if( !IsOK( NULL, _( "Must be Annotated, Continue ?" ) ) ) 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 );
if( CheckAnnotate( NULL, 0 ) )
return false; return false;
} }

View File

@ -271,8 +271,8 @@ void WinEDA_BasePcbFrame::ResetTextSize( BOARD_ITEM* aItem, wxDC* aDC )
{ {
wxSize newSize; wxSize newSize;
int newThickness; int newThickness;
TEXTE_PCB* pcbText; TEXTE_PCB* pcbText = NULL;
TEXTE_MODULE* moduleText; TEXTE_MODULE* moduleText = NULL;
EDA_TextStruct* text; EDA_TextStruct* text;
switch( aItem->Type() ) switch( aItem->Type() )