pcbnew: fixed: bug 2738052 (Delete tool does not delete zones outlines)

eeschema: fixed: void history file list in menu
This commit is contained in:
charras 2009-04-07 11:53:58 +00:00
parent 70707523dd
commit 1343d9fd41
7 changed files with 189 additions and 184 deletions

View File

@ -4,6 +4,13 @@ KiCad ChangeLog 2009
Please add newer entries at the top, list the date and your name with
email address.
2009-apr-07 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================
++pcbnew:
fixed: bug 2738052 (Delete tool does not delete zones outlines)
++eeschema:
fixed: void history file list in menu
2009-apr-06 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================
++common:

View File

@ -86,7 +86,7 @@ bool GetAssociatedDocument( wxFrame* frame, const wxString& LibPath,
*/
{
wxString docpath, fullfilename, file_ext;
wxString Line;
wxString msg;
wxString command;
bool success = FALSE;
@ -143,8 +143,9 @@ bool GetAssociatedDocument( wxFrame* frame, const wxString& LibPath,
if( !wxFileExists( fullfilename ) )
{
Line = _( "Doc File " ) + fullfilename + _( " not found" );
DisplayError( frame, Line );
msg = _( "Doc File " );
msg << wxT("\"") << fullfilename << wxT("\"") << _( " not found" );
DisplayError( frame, msg );
return FALSE;
}
@ -183,9 +184,9 @@ bool GetAssociatedDocument( wxFrame* frame, const wxString& LibPath,
if( !success )
{
Line.Printf( _( "Unknown MIME type for doc file <%s>" ),
msg.Printf( _( "Unknown MIME type for doc file <%s>" ),
fullfilename.GetData() );
DisplayError( frame, Line );
DisplayError( frame, msg );
}
return success;

View File

@ -585,7 +585,7 @@ void WinEDA_App::GetSettings()
{
wxASSERT( m_EDA_Config != NULL && m_EDA_CommonConfig != NULL );
wxString Line, entry;
wxString Line;
unsigned ii;
m_HelpSize.x = 500;
@ -599,27 +599,6 @@ void WinEDA_App::GetSettings()
m_fileHistory.Load( *m_EDA_Config );
/* Load the last file history settings from legacy version if this is the
* first time wxFileHistory was used to manage the file history. */
if( m_fileHistory.GetCount() == (size_t) 0 )
{
for( ii = 0; ii < (unsigned) m_fileHistory.GetMaxFiles(); ii++ )
{
entry = wxT( "LastProject" );
if( ii != 0 )
entry << ii;
if( m_EDA_Config->Read( entry, &Line ) )
{
if( Line != wxEmptyString && wxFileName::FileExists( Line ) )
m_fileHistory.AddFileToHistory( Line );
else
m_EDA_Config->Write( entry, wxEmptyString );
Line = wxEmptyString;
}
}
}
/* Set default font sizes */
g_StdFontPointSize = m_EDA_Config->Read( wxT( "SdtFontSize" ),
FONT_DEFAULT_SIZE );

View File

@ -161,6 +161,7 @@ bool WinEDA_App::OnInit()
/* init EESCHEMA */
SeedLayers();
GetSettings();
extern PARAM_CFG_BASE* ParamCfgList[];
wxGetApp().ReadCurrentSetupValues( ParamCfgList );
Read_Hotkey_Config( frame, false ); /* Must be called before creating

View File

@ -616,13 +616,15 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
EDA_LibComponentStruct* LibEntry;
LibEntry = FindLibPart(
( (SCH_COMPONENT*) screen->GetCurItem() )->m_ChipName.GetData(),
wxEmptyString,
FIND_ALIAS );
wxEmptyString, FIND_ALIAS );
if( LibEntry && LibEntry->m_DocFile != wxEmptyString )
{
wxMessageBox(g_RealLibDirBuffer, LibEntry->m_DocFile);
GetAssociatedDocument( this,
g_RealLibDirBuffer,
LibEntry->m_DocFile );
}
}
break;
case ID_POPUP_SCH_ENTER_SHEET:

View File

@ -19,7 +19,7 @@
//C++ guarantees that operator delete checks its argument for null-ness
#ifndef SAFE_DELETE
#define SAFE_DELETE(p) delete (p); (p) = NULL;
#define SAFE_DELETE( p ) delete (p); (p) = NULL;
#endif
#define INTERNAL_UNIT_TYPE 0 // Internal unit = inch
@ -76,9 +76,9 @@ enum id_toolbar {
};
/**********************/
/* Classes pour WXWIN */
/**********************/
/***********************************************/
/* Classes for basic main frames used in kicad */
/***********************************************/
#define MSG_PANEL_DEFAULT_HEIGHT ( 28 ) // height of the infos display window
@ -108,7 +108,7 @@ public:
WinEDA_BasicFrame( wxWindow* father, int idtype,
const wxString& title,
const wxPoint& pos, const wxSize& size,
long style = KICAD_DEFAULT_DRAWFRAME_STYLE);
long style = KICAD_DEFAULT_DRAWFRAME_STYLE );
#ifdef KICAD_PYTHON
WinEDA_BasicFrame( const WinEDA_BasicFrame& ) { } // Should throw!!
WinEDA_BasicFrame() { } // Should throw!!
@ -146,7 +146,7 @@ class WinEDA_DrawFrame : public WinEDA_BasicFrame
{
public:
WinEDA_DrawPanel* DrawPanel; // Draw area
WinEDA_MsgPanel* MsgPanel; // Zone d'affichage de caracteristiques
WinEDA_MsgPanel* MsgPanel; // Panel used to display some info (bottom of the screen)
WinEDA_Toolbar* m_VToolBar; // Vertical (right side) Toolbar
WinEDA_Toolbar* m_AuxVToolBar; // Auxiliary Vertical (right side) Toolbar
WinEDA_Toolbar* m_OptionsToolBar; // Options Toolbar (left side)
@ -159,19 +159,19 @@ public:
int m_ID_current_state; // Id of active button on the vertical toolbar
int m_HTOOL_current_state; // Id of active button on horizontal toolbar
int m_InternalUnits; // nombre d'unites internes pour 1 pouce
// = 1000 pour schema, = 10000 pour PCB
int m_InternalUnits; // Internal units count in 1 inch
// = 1000 for eeschema, = 10000 for PCBnew and Gerbview
int m_UnitType; // Internal Unit type (0 = inch)
bool m_Draw_Axis; // TRUE pour avoir les axes dessines
bool m_Draw_Grid; // TRUE pour avoir la grille dessinee
bool m_Draw_Sheet_Ref; // TRUE pour avoir le cartouche dessin<69>
bool m_Draw_Axis; // TRUE to show X and Y axis
bool m_Draw_Grid; // TRUE to show the grid
bool m_Draw_Sheet_Ref; // TRUE to show frame references
bool m_Print_Sheet_Ref; // TRUE pour avoir le cartouche imprim<69>
bool m_Draw_Auxiliary_Axis; // TRUE pour avoir les axes auxiliaires dessines
wxPoint m_Auxiliary_Axis_Position; /* origine de l'axe auxiliaire (app:
* dans la generation les fichiers de positionnement
* des composants) */
bool m_Print_Sheet_Ref; // TRUE to print frame references
bool m_Draw_Auxiliary_Axis; /* TRUE to show auxiliary axis. Used in pcbnew:
* the auxiliary axis is the origin of coordinates for drill, gerber and component position files
*/
wxPoint m_Auxiliary_Axis_Position; /* position of the auxiliary axis */
private:
BASE_SCREEN* m_CurrentScreen; ///< current used SCREEN
@ -221,7 +221,7 @@ public:
virtual void OnSelectGrid( wxCommandEvent& event );
virtual void OnSelectZoom( wxCommandEvent& event );
virtual void GeneralControle( wxDC* DC, wxPoint Mouse ){ /* dummy */ }
virtual void GeneralControle( wxDC* DC, wxPoint Mouse ) { /* dummy */ }
virtual void OnSize( wxSizeEvent& event );
void OnEraseBackground( wxEraseEvent& SizeEvent );
@ -240,7 +240,7 @@ public:
virtual int BestZoom() = 0;
/* Return the current zoom level */
int GetZoom(void);
int GetZoom( void );
void ToPrinter( wxCommandEvent& event );
void SVG_Print( wxCommandEvent& event );
@ -296,8 +296,8 @@ public:
/****************************************************/
/*********************************************************
class WinEDA_MsgPanel : this is a panel to display various infos
and messages on items in eeschema an pcbnew
* class WinEDA_MsgPanel : this is a panel to display various infos
* and messages on items in eeschema an pcbnew
*********************************************************/
/**
@ -328,7 +328,8 @@ struct MsgItem
m_UpperText = rv.m_UpperText; // overloaded operator=()
m_LowerText = rv.m_LowerText; // overloaded operator=()
m_Color = rv.m_Color;
return *this;
return * this;
}
};
@ -474,9 +475,9 @@ public:
};
/*************************************************************
Class to edit/enter a size (pair of values for X and Y size)
( INCHES or MM ) in dialog boxes
***************************************************************/
* Class to edit/enter a size (pair of values for X and Y size)
* ( INCHES or MM ) in dialog boxes
***************************************************************/
class WinEDA_SizeCtrl : public WinEDA_PositionCtrl
{
public:
@ -592,7 +593,7 @@ public:
const wxChar** m_ItemList;
private:
void (*m_MoveFct)( wxString & Text );
void (*m_MoveFct)( wxString& Text );
public:
WinEDAListBox( WinEDA_DrawFrame* parent, const wxString& title,

View File

@ -1124,6 +1124,20 @@ void WinEDA_PcbFrame::RemoveStruct( BOARD_ITEM* Item, wxDC* DC )
Delete_Zone_Fill( DC, (SEGZONE*) Item );
break;
case TYPE_ZONE_EDGE_CORNER:
Remove_Zone_Corner( DC, (ZONE_CONTAINER*) Item );
SetCurItem( NULL );
break;
case TYPE_ZONE_CONTAINER:
{
SetCurItem( NULL );
int netcode = ((ZONE_CONTAINER*) Item)->GetNet();
Delete_Zone_Contour( DC, (ZONE_CONTAINER*) Item );
test_1_net_connexion( NULL, netcode );
}
break;
case TYPE_MARKER:
if( Item == GetCurItem() )
SetCurItem( NULL );