Commit 1b1be195 authored by charras's avatar charras

changes in modedit for MacOSX compatibility

parent 8bf79111
...@@ -188,8 +188,7 @@ public: ...@@ -188,8 +188,7 @@ public:
int DrawMode, int color, int type ); int DrawMode, int color, int type );
// Gestion des modules // Gestion des modules
void InstallModuleOptionsFrame( MODULE* Module, void InstallModuleOptionsFrame( MODULE* Module, wxDC * DC );
wxDC* DC, const wxPoint& pos );
MODULE* Copie_Module( MODULE* module ); MODULE* Copie_Module( MODULE* module );
MODULE* Exchange_Module( wxWindow* winaff, MODULE* Exchange_Module( wxWindow* winaff,
MODULE* old_module, MODULE* old_module,
...@@ -228,7 +227,7 @@ public: ...@@ -228,7 +227,7 @@ public:
// module texts // module texts
void RotateTextModule( TEXTE_MODULE* Text, wxDC* DC ); void RotateTextModule( TEXTE_MODULE* Text, wxDC* DC );
void DeleteTextModule( TEXTE_MODULE* Text, wxDC* DC ); void DeleteTextModule( TEXTE_MODULE* Text );
void PlaceTexteModule( TEXTE_MODULE* Text, wxDC* DC ); void PlaceTexteModule( TEXTE_MODULE* Text, wxDC* DC );
void StartMoveTexteModule( TEXTE_MODULE* Text, wxDC* DC ); void StartMoveTexteModule( TEXTE_MODULE* Text, wxDC* DC );
TEXTE_MODULE* CreateTextModule( MODULE* Module, wxDC* DC ); TEXTE_MODULE* CreateTextModule( MODULE* Module, wxDC* DC );
...@@ -1000,9 +999,9 @@ private: ...@@ -1000,9 +999,9 @@ private:
public: public:
// Footprint edition // Footprint edition
void Place_Ancre( MODULE* module, wxDC* DC ); void Place_Ancre( MODULE* module );
void RemoveStruct( EDA_BaseStruct* Item, wxDC* DC ); void RemoveStruct( EDA_BaseStruct* Item );
void Transform( MODULE* module, wxDC* DC, int transform ); void Transform( MODULE* module, int transform );
// loading Footprint // loading Footprint
MODULE* Import_Module( wxDC* DC ); MODULE* Import_Module( wxDC* DC );
...@@ -1010,9 +1009,9 @@ public: ...@@ -1010,9 +1009,9 @@ public:
void Load_Module_Module_From_BOARD( MODULE* Module ); void Load_Module_Module_From_BOARD( MODULE* Module );
// functions to edit footprint edges // functions to edit footprint edges
void Edit_Edge_Width( EDGE_MODULE* Edge, wxDC* DC ); void Edit_Edge_Width( EDGE_MODULE* Edge );
void Edit_Edge_Layer( EDGE_MODULE* Edge, wxDC* DC ); void Edit_Edge_Layer( EDGE_MODULE* Edge );
void Delete_Edge_Module( EDGE_MODULE* Edge, wxDC* DC ); void Delete_Edge_Module( EDGE_MODULE* Edge );
EDGE_MODULE* Begin_Edge_Module( EDGE_MODULE* Edge, wxDC* DC, int type_edge ); EDGE_MODULE* Begin_Edge_Module( EDGE_MODULE* Edge, wxDC* DC, int type_edge );
void End_Edge_Module( EDGE_MODULE* Edge, wxDC* DC ); void End_Edge_Module( EDGE_MODULE* Edge, wxDC* DC );
void Enter_Edge_Width( EDGE_MODULE* Edge, wxDC* DC ); void Enter_Edge_Width( EDGE_MODULE* Edge, wxDC* DC );
......
No preview for this file type
...@@ -3,7 +3,7 @@ msgstr "" ...@@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: kicad\n" "Project-Id-Version: kicad\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-05-21 17:31+0100\n" "POT-Creation-Date: 2009-05-21 17:31+0100\n"
"PO-Revision-Date: 2009-05-21 17:37+0100\n" "PO-Revision-Date: 2009-05-21 18:16+0100\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: kicad team <jean-pierre.charras@ujf-grenoble.fr>\n" "Language-Team: kicad team <jean-pierre.charras@ujf-grenoble.fr>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
...@@ -290,11 +290,11 @@ msgstr "Nettoyage segments nulls" ...@@ -290,11 +290,11 @@ msgstr "Nettoyage segments nulls"
#: pcbnew/clean.cpp:506 #: pcbnew/clean.cpp:506
msgid "Merging Segments:" msgid "Merging Segments:"
msgstr "Fusionner Segments:" msgstr "Fusion des Segments:"
#: pcbnew/clean.cpp:508 #: pcbnew/clean.cpp:508
msgid "Merge" msgid "Merge"
msgstr "Fusionner" msgstr "Fusion"
#: pcbnew/clean.cpp:508 #: pcbnew/clean.cpp:508
msgid "0" msgid "0"
...@@ -374,7 +374,7 @@ msgstr "Erreur en Chargement de librairie" ...@@ -374,7 +374,7 @@ msgstr "Erreur en Chargement de librairie"
#: pcbnew/loadcmp.cpp:221 #: pcbnew/loadcmp.cpp:221
#, c-format #, c-format
msgid "Could not open PCB footprint library file <%s>." msgid "Could not open PCB footprint library file <%s>."
msgstr "Ne peu ouvrir le fichier librairie de modules PCB <%s>." msgstr "Ne peut ouvrir le fichier librairie de modules PCB <%s>."
#: pcbnew/loadcmp.cpp:228 #: pcbnew/loadcmp.cpp:228
#, c-format #, c-format
......
...@@ -37,9 +37,8 @@ END_EVENT_TABLE() ...@@ -37,9 +37,8 @@ END_EVENT_TABLE()
/**************************************************************************************/ /**************************************************************************************/
WinEDA_ModulePropertiesFrame::WinEDA_ModulePropertiesFrame( WinEDA_BasePcbFrame* parent, WinEDA_ModulePropertiesFrame::WinEDA_ModulePropertiesFrame( WinEDA_BasePcbFrame* parent,
MODULE* Module, wxDC* DC, MODULE* Module, wxDC* DC ) :
const wxPoint& framepos ) : wxDialog( parent, -1, _( "Module properties" ), wxDefaultPosition, wxDefaultSize, DIALOG_STYLE )
wxDialog( parent, -1, _( "Module properties" ), framepos, wxDefaultSize, DIALOG_STYLE )
/**************************************************************************************/ /**************************************************************************************/
{ {
wxString number; wxString number;
...@@ -813,7 +812,7 @@ void WinEDA_ModulePropertiesFrame::EditOrDelTextModule( wxCommandEvent& event ) ...@@ -813,7 +812,7 @@ void WinEDA_ModulePropertiesFrame::EditOrDelTextModule( wxCommandEvent& event )
Line.Printf( _( "Delete [%s]" ), Text->m_Text.GetData() ); Line.Printf( _( "Delete [%s]" ), Text->m_Text.GetData() );
if( !IsOK( this, Line ) ) if( !IsOK( this, Line ) )
goto out; goto out;
m_Parent->DeleteTextModule( Text, m_DC ); m_Parent->DeleteTextModule( Text );
ReCreateFieldListBox(); ReCreateFieldListBox();
m_TextListBox->SetSelection( 0 ); m_TextListBox->SetSelection( 0 );
} }
......
...@@ -54,7 +54,7 @@ private: ...@@ -54,7 +54,7 @@ private:
public: public:
// Constructor and destructor // Constructor and destructor
WinEDA_ModulePropertiesFrame(WinEDA_BasePcbFrame *parent, WinEDA_ModulePropertiesFrame(WinEDA_BasePcbFrame *parent,
MODULE * Module, wxDC * DC, const wxPoint & pos); MODULE * Module, wxDC * DC);
~WinEDA_ModulePropertiesFrame() ~WinEDA_ModulePropertiesFrame()
{ {
} }
......
...@@ -144,7 +144,7 @@ static void ShowEdgeModule( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) ...@@ -144,7 +144,7 @@ static void ShowEdgeModule( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
/***************************************************************************/ /***************************************************************************/
void WinEDA_ModuleEditFrame::Edit_Edge_Width( EDGE_MODULE* Edge, wxDC* DC ) void WinEDA_ModuleEditFrame::Edit_Edge_Width( EDGE_MODULE* Edge )
/***************************************************************************/ /***************************************************************************/
/* Change the EDGE_MODULE Edge width, /* Change the EDGE_MODULE Edge width,
...@@ -179,7 +179,7 @@ void WinEDA_ModuleEditFrame::Edit_Edge_Width( EDGE_MODULE* Edge, wxDC* DC ) ...@@ -179,7 +179,7 @@ void WinEDA_ModuleEditFrame::Edit_Edge_Width( EDGE_MODULE* Edge, wxDC* DC )
/***************************************************************************/ /***************************************************************************/
void WinEDA_ModuleEditFrame::Edit_Edge_Layer( EDGE_MODULE* Edge, wxDC* DC ) void WinEDA_ModuleEditFrame::Edit_Edge_Layer( EDGE_MODULE* Edge )
/***************************************************************************/ /***************************************************************************/
/* Change the EDGE_MODULE Edge layer, (The new layer will be asked) /* Change the EDGE_MODULE Edge layer, (The new layer will be asked)
...@@ -267,12 +267,11 @@ void WinEDA_ModuleEditFrame::Enter_Edge_Width( EDGE_MODULE* Edge, wxDC* DC ) ...@@ -267,12 +267,11 @@ void WinEDA_ModuleEditFrame::Enter_Edge_Width( EDGE_MODULE* Edge, wxDC* DC )
/****************************************************************************/ /****************************************************************************/
void WinEDA_ModuleEditFrame::Delete_Edge_Module( EDGE_MODULE* Edge, wxDC* DC ) void WinEDA_ModuleEditFrame::Delete_Edge_Module( EDGE_MODULE* Edge )
/****************************************************************************/ /****************************************************************************/
/* Edition of the edge items width /** Function Delete_Edge_Module
* delete EDGE_MODULE Edge if Edge != NULL * delete EDGE_MODULE Edge
* @param Edge = edge to edit, or NULL * @param Edge = edge to delete
* @param DC = current Device Context
*/ */
{ {
if( Edge == NULL ) if( Edge == NULL )
...@@ -284,7 +283,6 @@ void WinEDA_ModuleEditFrame::Delete_Edge_Module( EDGE_MODULE* Edge, wxDC* DC ) ...@@ -284,7 +283,6 @@ void WinEDA_ModuleEditFrame::Delete_Edge_Module( EDGE_MODULE* Edge, wxDC* DC )
} }
MODULE* Module = (MODULE*) Edge->GetParent(); MODULE* Module = (MODULE*) Edge->GetParent();
Edge->Draw( DrawPanel, DC, GR_XOR );
/* suppression d'un segment */ /* suppression d'un segment */
Edge ->DeleteStructure(); Edge ->DeleteStructure();
......
...@@ -697,7 +697,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -697,7 +697,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
SetCurItem( GetCurItem()->GetParent() ); SetCurItem( GetCurItem()->GetParent() );
if( !GetCurItem() || GetCurItem()->Type() != TYPE_MODULE ) if( !GetCurItem() || GetCurItem()->Type() != TYPE_MODULE )
break; break;
InstallModuleOptionsFrame( (MODULE*) GetCurItem(), &dc, pos ); InstallModuleOptionsFrame( (MODULE*) GetCurItem(), &dc );
DrawPanel->MouseToCursorSchema(); DrawPanel->MouseToCursorSchema();
break; break;
...@@ -756,7 +756,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -756,7 +756,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
break; break;
case ID_POPUP_PCB_DELETE_TEXTMODULE: case ID_POPUP_PCB_DELETE_TEXTMODULE:
DeleteTextModule( (TEXTE_MODULE*) GetCurItem(), &dc ); DeleteTextModule( (TEXTE_MODULE*) GetCurItem() );
SetCurItem( NULL ); SetCurItem( NULL );
DrawPanel->MouseToCursorSchema(); DrawPanel->MouseToCursorSchema();
break; break;
......
...@@ -19,23 +19,19 @@ ...@@ -19,23 +19,19 @@
/* Variables locales: */ /* Variables locales: */
bool GoToEditor = FALSE; bool GoToEditor = FALSE;
/**************************************/
/* class WinEDA_ModulePropertiesFrame */
/**************************************/
/* class WinEDA_ModulePropertiesFrame */
#include "dialog_edit_module.cpp" #include "dialog_edit_module.cpp"
/*******************************************************************/ /*******************************************************************/
void WinEDA_BasePcbFrame::InstallModuleOptionsFrame( MODULE* Module, void WinEDA_BasePcbFrame::InstallModuleOptionsFrame( MODULE* Module, wxDC * DC )
wxDC* DC,
const wxPoint& pos )
/*******************************************************************/ /*******************************************************************/
/* Fonction relai d'installation de la frame d'dition des proprietes /* Fonction relai d'installation de la frame d'dition des proprietes
* du module*/ * du module*/
{ {
WinEDA_ModulePropertiesFrame* frame = WinEDA_ModulePropertiesFrame* frame =
new WinEDA_ModulePropertiesFrame( this, Module, DC, pos ); new WinEDA_ModulePropertiesFrame( this, Module, DC );
frame->ShowModal(); frame->Destroy(); frame->ShowModal(); frame->Destroy();
...@@ -61,7 +57,7 @@ void WinEDA_BasePcbFrame::InstallModuleOptionsFrame( MODULE* Module, ...@@ -61,7 +57,7 @@ void WinEDA_BasePcbFrame::InstallModuleOptionsFrame( MODULE* Module,
/*******************************************************************/ /*******************************************************************/
void WinEDA_ModuleEditFrame::Place_Ancre( MODULE* pt_mod, wxDC* DC ) void WinEDA_ModuleEditFrame::Place_Ancre( MODULE* pt_mod )
/*******************************************************************/ /*******************************************************************/
/* /*
...@@ -69,32 +65,27 @@ void WinEDA_ModuleEditFrame::Place_Ancre( MODULE* pt_mod, wxDC* DC ) ...@@ -69,32 +65,27 @@ void WinEDA_ModuleEditFrame::Place_Ancre( MODULE* pt_mod, wxDC* DC )
* Le module doit etre d'abort selectionne * Le module doit etre d'abort selectionne
*/ */
{ {
int deltaX, deltaY; wxPoint delta;
EDA_BaseStruct* PtStruct; EDA_BaseStruct* PtStruct;
D_PAD* pt_pad; D_PAD* pt_pad;
if( pt_mod == NULL ) if( pt_mod == NULL )
return; return;
pt_mod->DrawAncre( DrawPanel, DC, wxPoint( 0, 0 ), delta = pt_mod->m_Pos - GetScreen()->m_Curseur;
DIM_ANCRE_MODULE, GR_XOR );
deltaX = pt_mod->m_Pos.x - GetScreen()->m_Curseur.x;
deltaY = pt_mod->m_Pos.y - GetScreen()->m_Curseur.y;
pt_mod->m_Pos = GetScreen()->m_Curseur; pt_mod->m_Pos = GetScreen()->m_Curseur;
/* Mise a jour des coord relatives des elements: /* Mise a jour des coord relatives des elements:
* les coordonnees relatives sont relatives a l'ancre, pour orient 0. * les coordonnees relatives sont relatives a l'ancre, pour orient 0.
* il faut donc recalculer deltaX et deltaY en orientation 0 */ * il faut donc recalculer deltaX et deltaY en orientation 0 */
RotatePoint( &deltaX, &deltaY, -pt_mod->m_Orient ); RotatePoint( &delta, -pt_mod->m_Orient );
/* Mise a jour des coord relatives des pads */ /* Mise a jour des coord relatives des pads */
pt_pad = (D_PAD*) pt_mod->m_Pads; pt_pad = (D_PAD*) pt_mod->m_Pads;
for( ; pt_pad != NULL; pt_pad = pt_pad->Next() ) for( ; pt_pad != NULL; pt_pad = pt_pad->Next() )
{ {
pt_pad->m_Pos0.x += deltaX; pt_pad->m_Pos0 += delta;
pt_pad->m_Pos0.y += deltaY;
} }
/* Mise a jour des coord relatives contours .. */ /* Mise a jour des coord relatives contours .. */
...@@ -106,14 +97,14 @@ void WinEDA_ModuleEditFrame::Place_Ancre( MODULE* pt_mod, wxDC* DC ) ...@@ -106,14 +97,14 @@ void WinEDA_ModuleEditFrame::Place_Ancre( MODULE* pt_mod, wxDC* DC )
case TYPE_EDGE_MODULE: case TYPE_EDGE_MODULE:
#undef STRUCT #undef STRUCT
#define STRUCT ( (EDGE_MODULE*) PtStruct ) #define STRUCT ( (EDGE_MODULE*) PtStruct )
STRUCT->m_Start0.x += deltaX; STRUCT->m_Start0.y += deltaY; STRUCT->m_Start0 += delta;
STRUCT->m_End0.x += deltaX; STRUCT->m_End0.y += deltaY; STRUCT->m_End0 += delta;
break; break;
case TYPE_TEXTE_MODULE: case TYPE_TEXTE_MODULE:
#undef STRUCT #undef STRUCT
#define STRUCT ( (TEXTE_MODULE*) PtStruct ) #define STRUCT ( (TEXTE_MODULE*) PtStruct )
STRUCT->m_Pos0.x += deltaX; STRUCT->m_Pos0.y += deltaY; STRUCT->m_Pos0 += delta;
break; break;
default: default:
...@@ -122,12 +113,12 @@ void WinEDA_ModuleEditFrame::Place_Ancre( MODULE* pt_mod, wxDC* DC ) ...@@ -122,12 +113,12 @@ void WinEDA_ModuleEditFrame::Place_Ancre( MODULE* pt_mod, wxDC* DC )
} }
pt_mod->Set_Rectangle_Encadrement(); pt_mod->Set_Rectangle_Encadrement();
pt_mod->DrawAncre( DrawPanel, DC, wxPoint( 0, 0 ), DIM_ANCRE_MODULE, GR_OR ); DrawPanel->Refresh();
} }
/**********************************************************************/ /**********************************************************************/
void WinEDA_ModuleEditFrame::RemoveStruct( EDA_BaseStruct* Item, wxDC* DC ) void WinEDA_ModuleEditFrame::RemoveStruct( EDA_BaseStruct* Item )
/**********************************************************************/ /**********************************************************************/
{ {
if( Item == NULL ) if( Item == NULL )
...@@ -152,12 +143,13 @@ void WinEDA_ModuleEditFrame::RemoveStruct( EDA_BaseStruct* Item, wxDC* DC ) ...@@ -152,12 +143,13 @@ void WinEDA_ModuleEditFrame::RemoveStruct( EDA_BaseStruct* Item, wxDC* DC )
DisplayError( this, _( "Text is VALUE!" ) ); DisplayError( this, _( "Text is VALUE!" ) );
break; break;
} }
DeleteTextModule( text, DC ); DeleteTextModule( text );
} }
break; break;
case TYPE_EDGE_MODULE: case TYPE_EDGE_MODULE:
Delete_Edge_Module( (EDGE_MODULE*) Item, DC ); Delete_Edge_Module( (EDGE_MODULE*) Item );
DrawPanel->Refresh();
break; break;
case TYPE_MODULE: case TYPE_MODULE:
......
...@@ -88,7 +88,7 @@ void WinEDA_BasePcbFrame::RotateTextModule( TEXTE_MODULE* Text, wxDC* DC ) ...@@ -88,7 +88,7 @@ void WinEDA_BasePcbFrame::RotateTextModule( TEXTE_MODULE* Text, wxDC* DC )
/**************************************************************************/ /**************************************************************************/
void WinEDA_BasePcbFrame::DeleteTextModule( TEXTE_MODULE* Text, wxDC* DC ) void WinEDA_BasePcbFrame::DeleteTextModule( TEXTE_MODULE* Text )
/**************************************************************************/ /**************************************************************************/
/* /*
...@@ -104,7 +104,6 @@ void WinEDA_BasePcbFrame::DeleteTextModule( TEXTE_MODULE* Text, wxDC* DC ) ...@@ -104,7 +104,6 @@ void WinEDA_BasePcbFrame::DeleteTextModule( TEXTE_MODULE* Text, wxDC* DC )
if( Text->m_Type == TEXT_is_DIVERS ) if( Text->m_Type == TEXT_is_DIVERS )
{ {
// Text->Draw( DrawPanel, DC, GR_XOR );
DrawPanel->PostDirtyRect( Text->GetBoundingBox() ); DrawPanel->PostDirtyRect( Text->GetBoundingBox() );
/* liberation de la memoire : */ /* liberation de la memoire : */
......
This diff is collapsed.
...@@ -52,7 +52,7 @@ void WinEDA_ModuleEditFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -52,7 +52,7 @@ void WinEDA_ModuleEditFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
wxString msg; wxString msg;
msg.Printf( msg.Printf(
wxT( wxT(
"WinEDA_ModEditFrame::ProcessCommand err: m_Flags != 0\nStruct @%p, type %d m_Flag %X" ), "WinEDA_ModEditFrame::OnLeftClick err: m_Flags != 0\nStruct @%p, type %d m_Flag %X" ),
DrawStruct, DrawStruct->Type(), DrawStruct->m_Flags ); DrawStruct, DrawStruct->Type(), DrawStruct->m_Flags );
DisplayError( this, msg ); DisplayError( this, msg );
DrawStruct->m_Flags = 0; DrawStruct->m_Flags = 0;
...@@ -122,7 +122,7 @@ void WinEDA_ModuleEditFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -122,7 +122,7 @@ void WinEDA_ModuleEditFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
if( DrawStruct && (DrawStruct->m_Flags == 0) ) if( DrawStruct && (DrawStruct->m_Flags == 0) )
{ {
SaveCopyInUndoList( GetBoard()->m_Modules ); SaveCopyInUndoList( GetBoard()->m_Modules );
RemoveStruct( DrawStruct, DC ); RemoveStruct( DrawStruct );
SetCurItem( DrawStruct = NULL ); SetCurItem( DrawStruct = NULL );
} }
} }
...@@ -130,7 +130,7 @@ void WinEDA_ModuleEditFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -130,7 +130,7 @@ void WinEDA_ModuleEditFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
case ID_MODEDIT_PLACE_ANCHOR: case ID_MODEDIT_PLACE_ANCHOR:
SaveCopyInUndoList( GetBoard()->m_Modules ); SaveCopyInUndoList( GetBoard()->m_Modules );
Place_Ancre( GetBoard()->m_Modules, DC ); Place_Ancre( GetBoard()->m_Modules );
GetBoard()->m_Modules->m_Flags = 0; GetBoard()->m_Modules->m_Flags = 0;
GetScreen()->m_Curseur = wxPoint( 0, 0 ); GetScreen()->m_Curseur = wxPoint( 0, 0 );
Recadre_Trace( TRUE ); Recadre_Trace( TRUE );
...@@ -401,8 +401,7 @@ void WinEDA_ModuleEditFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -401,8 +401,7 @@ void WinEDA_ModuleEditFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
break; break;
case TYPE_MODULE: case TYPE_MODULE:
InstallModuleOptionsFrame( (MODULE*) DrawStruct, InstallModuleOptionsFrame( (MODULE*) DrawStruct, &dc );
&dc, pos );
DrawPanel->MouseToCursorSchema(); DrawPanel->MouseToCursorSchema();
break; break;
......
...@@ -214,10 +214,7 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -214,10 +214,7 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
if( DrawStruct ) if( DrawStruct )
DrawPanel->m_AutoPAN_Request = TRUE; DrawPanel->m_AutoPAN_Request = TRUE;
} }
else if( DrawStruct && else if( DrawStruct && (DrawStruct->m_Flags & IS_NEW) )
// (DrawStruct->Type() == TYPE_TRACK) &&
(DrawStruct->m_Flags & IS_NEW) )
{ {
TRACK* track = Begin_Route( (TRACK*) DrawStruct, DC ); TRACK* track = Begin_Route( (TRACK*) DrawStruct, DC );
if( track ) // c'est a dire si OK if( track ) // c'est a dire si OK
...@@ -391,7 +388,7 @@ void WinEDA_PcbFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -391,7 +388,7 @@ void WinEDA_PcbFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
break; break;
case TYPE_MODULE: case TYPE_MODULE:
InstallModuleOptionsFrame( (MODULE*) DrawStruct, &dc, pos ); InstallModuleOptionsFrame( (MODULE*) DrawStruct, &dc );
DrawPanel->MouseToCursorSchema(); DrawPanel->MouseToCursorSchema();
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment