minor refactor
This commit is contained in:
parent
3ace948197
commit
8f1897adfd
|
@ -713,6 +713,7 @@ void LIB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
int id = event.GetId();
|
int id = event.GetId();
|
||||||
wxPoint pos;
|
wxPoint pos;
|
||||||
|
SCH_SCREEN* screen = GetScreen();
|
||||||
|
|
||||||
m_canvas->SetIgnoreMouseEvents( true );
|
m_canvas->SetIgnoreMouseEvents( true );
|
||||||
|
|
||||||
|
@ -887,48 +888,48 @@ void LIB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
||||||
|
|
||||||
case ID_POPUP_ZOOM_BLOCK:
|
case ID_POPUP_ZOOM_BLOCK:
|
||||||
m_canvas->SetAutoPanRequest( false );
|
m_canvas->SetAutoPanRequest( false );
|
||||||
GetScreen()->m_BlockLocate.SetCommand( BLOCK_ZOOM );
|
screen->m_BlockLocate.SetCommand( BLOCK_ZOOM );
|
||||||
HandleBlockEnd( &dc );
|
HandleBlockEnd( &dc );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_POPUP_DELETE_BLOCK:
|
case ID_POPUP_DELETE_BLOCK:
|
||||||
m_canvas->SetAutoPanRequest( false );
|
m_canvas->SetAutoPanRequest( false );
|
||||||
GetScreen()->m_BlockLocate.SetCommand( BLOCK_DELETE );
|
screen->m_BlockLocate.SetCommand( BLOCK_DELETE );
|
||||||
m_canvas->MoveCursorToCrossHair();
|
m_canvas->MoveCursorToCrossHair();
|
||||||
HandleBlockEnd( &dc );
|
HandleBlockEnd( &dc );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_POPUP_DUPLICATE_BLOCK:
|
case ID_POPUP_DUPLICATE_BLOCK:
|
||||||
m_canvas->SetAutoPanRequest( false );
|
m_canvas->SetAutoPanRequest( false );
|
||||||
GetScreen()->m_BlockLocate.SetCommand( BLOCK_DUPLICATE );
|
screen->m_BlockLocate.SetCommand( BLOCK_DUPLICATE );
|
||||||
m_canvas->MoveCursorToCrossHair();
|
m_canvas->MoveCursorToCrossHair();
|
||||||
HandleBlockEnd( &dc );
|
HandleBlockEnd( &dc );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_POPUP_SELECT_ITEMS_BLOCK:
|
case ID_POPUP_SELECT_ITEMS_BLOCK:
|
||||||
m_canvas->SetAutoPanRequest( false );
|
m_canvas->SetAutoPanRequest( false );
|
||||||
GetScreen()->m_BlockLocate.SetCommand( BLOCK_SELECT_ITEMS_ONLY );
|
screen->m_BlockLocate.SetCommand( BLOCK_SELECT_ITEMS_ONLY );
|
||||||
m_canvas->MoveCursorToCrossHair();
|
m_canvas->MoveCursorToCrossHair();
|
||||||
HandleBlockEnd( &dc );
|
HandleBlockEnd( &dc );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_POPUP_MIRROR_Y_BLOCK:
|
case ID_POPUP_MIRROR_Y_BLOCK:
|
||||||
m_canvas->SetAutoPanRequest( false );
|
m_canvas->SetAutoPanRequest( false );
|
||||||
GetScreen()->m_BlockLocate.SetCommand( BLOCK_MIRROR_Y );
|
screen->m_BlockLocate.SetCommand( BLOCK_MIRROR_Y );
|
||||||
m_canvas->MoveCursorToCrossHair();
|
m_canvas->MoveCursorToCrossHair();
|
||||||
HandleBlockPlace( &dc );
|
HandleBlockPlace( &dc );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_POPUP_MIRROR_X_BLOCK:
|
case ID_POPUP_MIRROR_X_BLOCK:
|
||||||
m_canvas->SetAutoPanRequest( false );
|
m_canvas->SetAutoPanRequest( false );
|
||||||
GetScreen()->m_BlockLocate.SetCommand( BLOCK_MIRROR_X );
|
screen->m_BlockLocate.SetCommand( BLOCK_MIRROR_X );
|
||||||
m_canvas->MoveCursorToCrossHair();
|
m_canvas->MoveCursorToCrossHair();
|
||||||
HandleBlockPlace( &dc );
|
HandleBlockPlace( &dc );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_POPUP_ROTATE_BLOCK:
|
case ID_POPUP_ROTATE_BLOCK:
|
||||||
m_canvas->SetAutoPanRequest( false );
|
m_canvas->SetAutoPanRequest( false );
|
||||||
GetScreen()->m_BlockLocate.SetCommand( BLOCK_ROTATE );
|
screen->m_BlockLocate.SetCommand( BLOCK_ROTATE );
|
||||||
m_canvas->MoveCursorToCrossHair();
|
m_canvas->MoveCursorToCrossHair();
|
||||||
HandleBlockPlace( &dc );
|
HandleBlockPlace( &dc );
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue