position new modules at (0,0)
This commit is contained in:
parent
b24418d95b
commit
2057c81582
|
@ -24,9 +24,8 @@ BOARD_ITEM* WinEDA_ModuleEditFrame::ModeditLocateAndDisplay( int aHotKeyCode )
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
{
|
{
|
||||||
BOARD_ITEM* item = GetCurItem();
|
BOARD_ITEM* item = GetCurItem();
|
||||||
MODULE* Module = m_Pcb->m_Modules;
|
|
||||||
|
|
||||||
if( Module == NULL )
|
if( m_Pcb->m_Modules == NULL )
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
GENERAL_COLLECTORS_GUIDE guide = GetCollectorsGuide();
|
GENERAL_COLLECTORS_GUIDE guide = GetCollectorsGuide();
|
||||||
|
@ -209,14 +208,20 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_MODEDIT_NEW_MODULE:
|
case ID_MODEDIT_NEW_MODULE:
|
||||||
|
{
|
||||||
Clear_Pcb( TRUE );
|
Clear_Pcb( TRUE );
|
||||||
GetScreen()->ClearUndoRedoList();
|
GetScreen()->ClearUndoRedoList();
|
||||||
SetCurItem( NULL );
|
SetCurItem( NULL );
|
||||||
GetScreen()->m_Curseur = wxPoint( 0, 0 );
|
GetScreen()->m_Curseur = wxPoint( 0, 0 );
|
||||||
Create_1_Module( &dc, wxEmptyString );
|
|
||||||
|
MODULE* module = Create_1_Module( &dc, wxEmptyString );
|
||||||
|
wxASSERT( module );
|
||||||
|
module->SetPosition( wxPoint(0, 0) );
|
||||||
|
|
||||||
if( m_Pcb->m_Modules )
|
if( m_Pcb->m_Modules )
|
||||||
m_Pcb->m_Modules->m_Flags = 0;
|
m_Pcb->m_Modules->m_Flags = 0;
|
||||||
Zoom_Automatique( TRUE );
|
Zoom_Automatique( TRUE );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_MODEDIT_SAVE_LIBMODULE:
|
case ID_MODEDIT_SAVE_LIBMODULE:
|
||||||
|
@ -339,7 +344,6 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_MODEDIT_LOAD_MODULE:
|
case ID_MODEDIT_LOAD_MODULE:
|
||||||
{
|
|
||||||
GetScreen()->ClearUndoRedoList();
|
GetScreen()->ClearUndoRedoList();
|
||||||
SetCurItem( NULL );
|
SetCurItem( NULL );
|
||||||
Clear_Pcb( TRUE );
|
Clear_Pcb( TRUE );
|
||||||
|
@ -369,7 +373,6 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
|
||||||
if( m_Draw3DFrame )
|
if( m_Draw3DFrame )
|
||||||
m_Draw3DFrame->NewDisplay();
|
m_Draw3DFrame->NewDisplay();
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
case ID_MODEDIT_PAD_SETTINGS:
|
case ID_MODEDIT_PAD_SETTINGS:
|
||||||
InstallPadOptionsFrame( NULL, NULL, wxPoint( -1, -1 ) );
|
InstallPadOptionsFrame( NULL, NULL, wxPoint( -1, -1 ) );
|
||||||
|
|
Loading…
Reference in New Issue