From f34926be10baefa0ae1ba614034d15ef8c9f6e13 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 10 Jan 2011 18:47:50 +0100 Subject: [PATCH] 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). --- eeschema/netlist_control.cpp | 9 ++++++++- pcbnew/edtxtmod.cpp | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/eeschema/netlist_control.cpp b/eeschema/netlist_control.cpp index 980d58532c..a026bb2700 100644 --- a/eeschema/netlist_control.cpp +++ b/eeschema/netlist_control.cpp @@ -26,6 +26,7 @@ #include "sch_sheet.h" #include "dialog_helpers.h" #include "netlist_control.h" +#include "dialogs/annotate_dialog.h" //Imported function: @@ -523,7 +524,13 @@ bool SCH_EDIT_FRAME::CreateNetlist( int aFormat, const wxString& aFullFileName, // Performs some controls: 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; } diff --git a/pcbnew/edtxtmod.cpp b/pcbnew/edtxtmod.cpp index 9e7a2687d3..de0e610868 100644 --- a/pcbnew/edtxtmod.cpp +++ b/pcbnew/edtxtmod.cpp @@ -271,8 +271,8 @@ void WinEDA_BasePcbFrame::ResetTextSize( BOARD_ITEM* aItem, wxDC* aDC ) { wxSize newSize; int newThickness; - TEXTE_PCB* pcbText; - TEXTE_MODULE* moduleText; + TEXTE_PCB* pcbText = NULL; + TEXTE_MODULE* moduleText = NULL; EDA_TextStruct* text; switch( aItem->Type() )