restored: missing lines in schedit.cpp (problems in a lot of commands)

This commit is contained in:
charras 2008-03-10 11:42:41 +00:00
parent 8111fe4984
commit 32a693f574
2 changed files with 125 additions and 31 deletions

View File

@ -16,6 +16,10 @@ email address.
WinEDA_DrawPanel::ConvertPcbUnitsToPixelsUnits( EDA_Rect& aRect ) can be used to convert a bouding box to a clip box
(see example in deltrack.cpp)
+eeschema:
restored: missing lines in schedit.cpp (problems in a lot of commands)
2008-Mar-06 UPDATE Igor Plyatov <plyatov@mail.ru>
================================================================================
+help

View File

@ -19,10 +19,10 @@
/*****************************************************************************
*
* Traite les selections d'outils et les commandes appelees du menu POPUP
*
*****************************************************************************/
*
* Traite les selections d'outils et les commandes appelees du menu POPUP
*
*****************************************************************************/
void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
{
int id = event.GetId();
@ -38,6 +38,88 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
// If needed, stop the current command and deselect current tool
switch( id )
{
case ID_POPUP_SCH_ENTRY_SELECT_SLASH:
case ID_POPUP_SCH_ENTRY_SELECT_ANTISLASH:
case ID_POPUP_END_LINE:
case ID_POPUP_SCH_EDIT_TEXT:
case ID_POPUP_SCH_CHANGE_TYPE_TEXT_TO_LABEL:
case ID_POPUP_SCH_CHANGE_TYPE_TEXT_TO_GLABEL:
case ID_POPUP_SCH_CHANGE_TYPE_TEXT_TO_COMMENT:
case ID_POPUP_SCH_SET_SHAPE_TEXT:
case ID_POPUP_SCH_ROTATE_TEXT:
case ID_POPUP_SCH_EDIT_SHEET:
case ID_POPUP_SCH_CLEANUP_SHEET:
case ID_POPUP_SCH_END_SHEET:
case ID_POPUP_SCH_RESIZE_SHEET:
case ID_POPUP_SCH_EDIT_PINSHEET:
case ID_POPUP_SCH_MOVE_PINSHEET:
case ID_POPUP_SCH_MOVE_ITEM_REQUEST:
case ID_POPUP_SCH_MOVE_CMP_REQUEST:
case ID_POPUP_SCH_DRAG_CMP_REQUEST:
case ID_POPUP_SCH_EDIT_CMP:
case ID_POPUP_SCH_MIROR_X_CMP:
case ID_POPUP_SCH_MIROR_Y_CMP:
case ID_POPUP_SCH_ROTATE_CMP_CLOCKWISE:
case ID_POPUP_SCH_ROTATE_CMP_COUNTERCLOCKWISE:
case ID_POPUP_SCH_ORIENT_NORMAL_CMP:
case ID_POPUP_SCH_INIT_CMP:
case ID_POPUP_SCH_DISPLAYDOC_CMP:
case ID_POPUP_SCH_EDIT_VALUE_CMP:
case ID_POPUP_SCH_EDIT_REF_CMP:
case ID_POPUP_SCH_EDIT_FOOTPRINT_CMP:
case ID_POPUP_SCH_EDIT_CONVERT_CMP:
case ID_POPUP_SCH_SELECT_UNIT_CMP:
case ID_POPUP_SCH_SELECT_UNIT1:
case ID_POPUP_SCH_SELECT_UNIT2:
case ID_POPUP_SCH_SELECT_UNIT3:
case ID_POPUP_SCH_SELECT_UNIT4:
case ID_POPUP_SCH_SELECT_UNIT5:
case ID_POPUP_SCH_SELECT_UNIT6:
case ID_POPUP_SCH_SELECT_UNIT7:
case ID_POPUP_SCH_SELECT_UNIT8:
case ID_POPUP_SCH_SELECT_UNIT9:
case ID_POPUP_SCH_SELECT_UNIT10:
case ID_POPUP_SCH_SELECT_UNIT11:
case ID_POPUP_SCH_SELECT_UNIT12:
case ID_POPUP_SCH_SELECT_UNIT13:
case ID_POPUP_SCH_SELECT_UNIT14:
case ID_POPUP_SCH_SELECT_UNIT15:
case ID_POPUP_SCH_SELECT_UNIT16:
case ID_POPUP_SCH_SELECT_UNIT17:
case ID_POPUP_SCH_SELECT_UNIT18:
case ID_POPUP_SCH_SELECT_UNIT19:
case ID_POPUP_SCH_SELECT_UNIT20:
case ID_POPUP_SCH_SELECT_UNIT21:
case ID_POPUP_SCH_SELECT_UNIT22:
case ID_POPUP_SCH_SELECT_UNIT23:
case ID_POPUP_SCH_SELECT_UNIT24:
case ID_POPUP_SCH_SELECT_UNIT25:
case ID_POPUP_SCH_SELECT_UNIT26:
case ID_POPUP_SCH_ROTATE_FIELD:
case ID_POPUP_SCH_EDIT_FIELD:
case ID_POPUP_DELETE_BLOCK:
case ID_POPUP_PLACE_BLOCK:
case ID_POPUP_ZOOM_BLOCK:
case ID_POPUP_DRAG_BLOCK:
case ID_POPUP_COPY_BLOCK:
case ID_POPUP_ROTATE_BLOCK:
case ID_POPUP_MIRROR_X_BLOCK:
case ID_POPUP_MIRROR_Y_BLOCK:
case ID_POPUP_SCH_DELETE_NODE:
case ID_POPUP_SCH_DELETE_CONNECTION:
case wxID_CUT:
case wxID_COPY:
case ID_POPUP_SCH_ENTER_SHEET:
case ID_POPUP_SCH_LEAVE_SHEET:
case ID_POPUP_SCH_ADD_JUNCTION:
case ID_POPUP_SCH_ADD_LABEL:
/* At this point: Do nothing. these commands do not need to stop the current command
* (mainly a block command) or reset the current state
* They will be executed later, in next switch structure.
*/
break;
case ID_POPUP_CANCEL_CURRENT_COMMAND:
if( GetScreen()->BlockLocate.m_Command != BLOCK_IDLE )
DrawPanel->SetCursor( wxCursor( DrawPanel->m_PanelCursor =
@ -346,6 +428,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
break;
case ID_POPUP_SCH_EDIT_CMP:
// Ensure the struct is a component (could be a struct of a
// component, like Field, text..)
if( GetScreen()->GetCurItem()->Type() != DRAW_LIB_ITEM_STRUCT_TYPE )
@ -362,6 +445,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_SCH_ROTATE_CMP_CLOCKWISE:
case ID_POPUP_SCH_ROTATE_CMP_COUNTERCLOCKWISE:
case ID_POPUP_SCH_ORIENT_NORMAL_CMP:
// Ensure the struct is a component (could be a struct of a
// component, like Field, text..)
if( GetScreen()->GetCurItem()->Type() != DRAW_LIB_ITEM_STRUCT_TYPE )
@ -418,6 +502,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
break;
case ID_POPUP_SCH_EDIT_REF_CMP:
// Ensure the struct is a component (could be a struct of a
// component, like Field, text..)
if( GetScreen()->GetCurItem()->Type() != DRAW_LIB_ITEM_STRUCT_TYPE )
@ -430,6 +515,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
break;
case ID_POPUP_SCH_EDIT_FOOTPRINT_CMP:
// Ensure the struct is a component (could be a struct of a
// component, like Field, text..)
if( GetScreen()->GetCurItem()->Type() != DRAW_LIB_ITEM_STRUCT_TYPE )
@ -443,6 +529,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_SCH_EDIT_CONVERT_CMP:
// Ensure the struct is a component (could be a struct of a
// component, like Field, text..)
if( GetScreen()->GetCurItem()->Type() != DRAW_LIB_ITEM_STRUCT_TYPE )
@ -471,6 +558,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
newitem->ClearAnnotation();
newitem->m_Flags = IS_NEW;
StartMovePart( newitem, &dc );
/* Redraw the original part, because StartMovePart() has erase
* it from screen */
RedrawOneStruct( DrawPanel, &dc, olditem, GR_DEFAULT_DRAWMODE );
@ -503,6 +591,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_SCH_SELECT_UNIT24:
case ID_POPUP_SCH_SELECT_UNIT25:
case ID_POPUP_SCH_SELECT_UNIT26:
// Ensure the struct is a component (could be a struct of a
// component, like Field, text..)
if( GetScreen()->GetCurItem()->Type() != DRAW_LIB_ITEM_STRUCT_TYPE )
@ -518,6 +607,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
break;
case ID_POPUP_SCH_DISPLAYDOC_CMP:
// Ensure the struct is a component (could be a piece of a
// component, like Field, text..)
if( GetScreen()->GetCurItem()->Type() != DRAW_LIB_ITEM_STRUCT_TYPE )