Loading CHANGELOG.txt +10 −0 Original line number Original line Diff line number Diff line Loading @@ -4,6 +4,16 @@ KiCad ChangeLog 2010 Please add newer entries at the top, list the date and your name with Please add newer entries at the top, list the date and your name with email address. email address. 2010-Jan-17 UPDATE Jerry Jacobs <xor.gate.engineering[at]gmail[dot]com> ================================================================================ + EESchema + Added Torsten Huter's patch for hotkeys + Moved recent opened documents to submenu + Pcbnew + Big (re)organisation of pcbframe menubar and cleanup 2010-Jan-13 UPDATE Wayne Stambaugh <stambaughw@verizon.net> 2010-Jan-13 UPDATE Wayne Stambaugh <stambaughw@verizon.net> ================================================================================ ================================================================================ Minor bug fixes, compiler warning fixes and code cleaning. Minor bug fixes, compiler warning fixes and code cleaning. Loading eeschema/eeschema_id.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -163,6 +163,7 @@ enum id_eeschema_frm /* Library editor context menu IDs */ /* Library editor context menu IDs */ ID_LIBEDIT_EDIT_PIN, ID_LIBEDIT_EDIT_PIN, ID_LIBEDIT_ROTATE_PIN, ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_ITEM, ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_ITEM, ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_PINSIZE_ITEM, ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_PINSIZE_ITEM, ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_PINNAMESIZE_ITEM, ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_PINNAMESIZE_ITEM, Loading eeschema/hotkeys.cpp +137 −74 Original line number Original line Diff line number Diff line Loading @@ -74,8 +74,8 @@ static Ki_HotkeyInfo HkMirrorXComponent( wxT( "Mirror X Component" ), HK_MIRROR_X_COMPONENT, 'X' ); HK_MIRROR_X_COMPONENT, 'X' ); static Ki_HotkeyInfo HkOrientNormalComponent( wxT( "Orient Normal Component" ), static Ki_HotkeyInfo HkOrientNormalComponent( wxT( "Orient Normal Component" ), HK_ORIENT_NORMAL_COMPONENT, 'N' ); HK_ORIENT_NORMAL_COMPONENT, 'N' ); static Ki_HotkeyInfo HkRotateComponent( wxT( "Rotate Component or Label" ), static Ki_HotkeyInfo HkRotateComponentOrItem( wxT( "Rotate Schematic Item" ), HK_ROTATE_COMPONENT_OR_LABEL, 'R' ); HK_ROTATE_COMPONENT_OR_ITEM, 'R' ); static Ki_HotkeyInfo HkEditComponent( wxT( "Edit Component or Label" ), static Ki_HotkeyInfo HkEditComponent( wxT( "Edit Component or Label" ), HK_EDIT_COMPONENT_OR_LABEL, 'E' ); HK_EDIT_COMPONENT_OR_LABEL, 'E' ); static Ki_HotkeyInfo HkEditComponentValue( wxT( "Edit Component Value" ), static Ki_HotkeyInfo HkEditComponentValue( wxT( "Edit Component Value" ), Loading @@ -83,8 +83,8 @@ static Ki_HotkeyInfo HkEditComponentValue( wxT( "Edit Component Value" ), static Ki_HotkeyInfo HkEditComponentFootprint( wxT( "Edit Component Footprint" ), static Ki_HotkeyInfo HkEditComponentFootprint( wxT( "Edit Component Footprint" ), HK_EDIT_COMPONENT_FOOTPRINT, HK_EDIT_COMPONENT_FOOTPRINT, 'F' ); 'F' ); static Ki_HotkeyInfo HkMoveComponentOrText( wxT( "Move Component or Label" ), static Ki_HotkeyInfo HkMoveComponentOrItem( wxT( "Move Schematic Item" ), HK_MOVE_COMPONENT_OR_LABEL, 'M', HK_MOVE_COMPONENT_OR_ITEM, 'M', ID_POPUP_SCH_MOVE_CMP_REQUEST ); ID_POPUP_SCH_MOVE_CMP_REQUEST ); static Ki_HotkeyInfo HkCopyComponentOrText( wxT( "Copy Component or Label" ), static Ki_HotkeyInfo HkCopyComponentOrText( wxT( "Copy Component or Label" ), Loading @@ -107,6 +107,7 @@ static Ki_HotkeyInfo HkInsertPin( wxT( "Repeat Pin" ), HK_REPEAT_LAST, WXK_INSERT ); WXK_INSERT ); static Ki_HotkeyInfo HkEditPin( wxT( "Edit Pin" ), HK_EDIT_PIN, 'E' ); static Ki_HotkeyInfo HkEditPin( wxT( "Edit Pin" ), HK_EDIT_PIN, 'E' ); static Ki_HotkeyInfo HkMovePin( wxT( "Move Pin" ), HK_LIBEDIT_MOVE_GRAPHIC_ITEM, 'M' ); static Ki_HotkeyInfo HkMovePin( wxT( "Move Pin" ), HK_LIBEDIT_MOVE_GRAPHIC_ITEM, 'M' ); static Ki_HotkeyInfo HkRotatePin( wxT( "Rotate Pin" ), HK_LIBEDIT_ROTATE_PIN, 'R' ); static Ki_HotkeyInfo HkDeletePin( wxT( "Delete Pin" ), HK_DELETE_PIN, static Ki_HotkeyInfo HkDeletePin( wxT( "Delete Pin" ), HK_DELETE_PIN, WXK_DELETE ); WXK_DELETE ); Loading @@ -127,9 +128,9 @@ Ki_HotkeyInfo* s_Schematic_Hotkey_List[] = { { &HkNextSearch, &HkNextSearch, &HkDelete, &HkInsert, &HkMove2Drag, &HkDelete, &HkInsert, &HkMove2Drag, &HkMoveComponentOrText, &HkCopyComponentOrText, &HkMoveComponentOrItem, &HkCopyComponentOrText, &HkDragComponent, &HkAddComponent, &HkDragComponent, &HkAddComponent, &HkRotateComponent, &HkMirrorXComponent, &HkMirrorYComponent, &HkRotateComponentOrItem, &HkMirrorXComponent, &HkMirrorYComponent, &HkOrientNormalComponent, &HkOrientNormalComponent, &HkEditComponent,&HkEditComponentValue,&HkEditComponentFootprint, &HkEditComponent,&HkEditComponentValue,&HkEditComponentFootprint, &HkBeginWire, &HkBeginWire, Loading @@ -143,6 +144,7 @@ Ki_HotkeyInfo* s_LibEdit_Hotkey_List[] = &HkEditPin, &HkEditPin, &HkMovePin, &HkMovePin, &HkDeletePin, &HkDeletePin, &HkRotatePin, NULL NULL }; }; Loading Loading @@ -333,48 +335,54 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey, } } break; break; case HK_ROTATE_COMPONENT_OR_LABEL: // Component Rotation case HK_ROTATE_COMPONENT_OR_ITEM: // Component or other schematic item rotation if( DrawStruct == NULL ) if( DrawStruct == NULL ) { { DrawStruct = PickStruct( GetScreen()->m_Curseur, // Find the schematic object to rotate under the cursor GetScreen(), LIBITEM | TEXTITEM | DrawStruct = SchematicGeneralLocateAndDisplay( false ); LABELITEM ); if( DrawStruct == NULL ) if( DrawStruct == NULL ) break; break; if( DrawStruct->Type() == TYPE_SCH_COMPONENT ) if( DrawStruct->Type() == TYPE_SCH_COMPONENT ) DrawStruct = LocateSmallestComponent( GetScreen() ); DrawStruct = LocateSmallestComponent( GetScreen() ); if( DrawStruct == NULL ) if( DrawStruct == NULL ) break; break; } } if (DrawStruct) { GetScreen()->SetCurItem( (SCH_ITEM*) DrawStruct ); // Create the events for rotating a component or other schematic item wxCommandEvent eventRotateComponent( wxEVT_COMMAND_TOOL_CLICKED, ID_POPUP_SCH_ROTATE_CMP_COUNTERCLOCKWISE ); wxCommandEvent eventRotateText(wxEVT_COMMAND_TOOL_CLICKED, ID_POPUP_SCH_ROTATE_TEXT ); wxCommandEvent eventRotateField(wxEVT_COMMAND_TOOL_CLICKED, ID_POPUP_SCH_ROTATE_FIELD ); switch( DrawStruct->Type() ) switch( DrawStruct->Type() ) { { case TYPE_SCH_COMPONENT: case TYPE_SCH_COMPONENT: if( DrawStruct->m_Flags == 0 ) wxPostEvent( this, eventRotateComponent ); { SaveCopyInUndoList( (SCH_ITEM*) DrawStruct, UR_CHANGED ); RefreshToolBar = TRUE; } CmpRotationMiroir( (SCH_COMPONENT*) DrawStruct, DC, CMP_ROTATE_COUNTERCLOCKWISE ); break; break; case TYPE_SCH_TEXT: case TYPE_SCH_TEXT: case TYPE_SCH_LABEL: case TYPE_SCH_LABEL: case TYPE_SCH_GLOBALLABEL: case TYPE_SCH_GLOBALLABEL: case TYPE_SCH_HIERLABEL: case TYPE_SCH_HIERLABEL: if( DrawStruct->m_Flags == 0 ) wxPostEvent( this, eventRotateText ); { SaveCopyInUndoList( (SCH_ITEM*) DrawStruct, UR_CHANGED ); RefreshToolBar = TRUE; } ChangeTextOrient( (SCH_TEXT*) DrawStruct, DC ); break; break; case DRAW_PART_TEXT_STRUCT_TYPE: wxPostEvent( this, eventRotateField ); default: default: ; ; } } } break; break; Loading Loading @@ -422,20 +430,33 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey, break; break; case HK_DRAG_COMPONENT: // Start drag component case HK_DRAG_COMPONENT: // Start drag component case HK_MOVE_COMPONENT_OR_LABEL: // Start move component or text/label case HK_MOVE_COMPONENT_OR_ITEM: // Start move component or other schematic item case HK_COPY_COMPONENT_OR_LABEL: // Duplicate component or text/label case HK_COPY_COMPONENT_OR_LABEL: // Duplicate component or text/label if( ItemInEdit ) if( ItemInEdit ) break; break; if( DrawStruct == NULL ) if( DrawStruct == NULL ) { { DrawStruct = PickStruct( GetScreen()->m_Curseur, // Find the schematic object to move under the cursor GetScreen(), LIBITEM | TEXTITEM | DrawStruct = SchematicGeneralLocateAndDisplay( false ); LABELITEM ); if( DrawStruct == NULL ) if( DrawStruct == NULL ) break; break; if( DrawStruct->Type() == TYPE_SCH_COMPONENT ) if( DrawStruct->Type() == TYPE_SCH_COMPONENT ) DrawStruct = LocateSmallestComponent( GetScreen() ); DrawStruct = LocateSmallestComponent( GetScreen() ); if( DrawStruct->Type() == DRAW_SHEET_STRUCT_TYPE ){ // If it's a sheet, then check if a pinsheet is under the cursor SCH_SHEET_PIN* slabel = LocateSheetLabel( (SCH_SHEET*) DrawStruct, GetScreen()->m_Curseur ); if (slabel) DrawStruct = slabel; } if (DrawStruct->Type() == DRAW_JUNCTION_STRUCT_TYPE){ // If it's a junction, pick the underlying wire instead DrawStruct = PickStruct( GetScreen()->m_Curseur, GetScreen(), WIREITEM); } if( DrawStruct == NULL ) if( DrawStruct == NULL ) break; break; } } Loading @@ -449,33 +470,52 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey, break; break; } } if( DrawStruct && (DrawStruct->m_Flags == 0) ){ GetScreen()->SetCurItem( (SCH_ITEM*) DrawStruct ); // Create the events for moving a component or other schematic item wxCommandEvent eventMoveComponent( wxEVT_COMMAND_TOOL_CLICKED, HK_Descr->m_IdMenuEvent ); wxCommandEvent eventMoveItem(wxEVT_COMMAND_TOOL_CLICKED, ID_POPUP_SCH_MOVE_ITEM_REQUEST ); wxCommandEvent eventMovePinsheet(wxEVT_COMMAND_TOOL_CLICKED, ID_POPUP_SCH_MOVE_PINSHEET); wxCommandEvent eventDragWire(wxEVT_COMMAND_TOOL_CLICKED, ID_POPUP_SCH_DRAG_WIRE_REQUEST); switch( DrawStruct->Type() ) switch( DrawStruct->Type() ) { { // select the correct event for moving an schematic object // and add it to the event queue case TYPE_SCH_COMPONENT: case TYPE_SCH_COMPONENT: if( DrawStruct && (DrawStruct->m_Flags ==0) ) wxPostEvent( this, eventMoveComponent ); { GetScreen()->SetCurItem( (SCH_ITEM*) DrawStruct ); wxCommandEvent event( wxEVT_COMMAND_TOOL_CLICKED, HK_Descr->m_IdMenuEvent ); wxPostEvent( this, event ); } break; break; case TYPE_SCH_TEXT: case TYPE_SCH_TEXT: case TYPE_SCH_LABEL: case TYPE_SCH_LABEL: case TYPE_SCH_GLOBALLABEL: case TYPE_SCH_GLOBALLABEL: case TYPE_SCH_HIERLABEL: case TYPE_SCH_HIERLABEL: if( DrawStruct->m_Flags == 0 ) case DRAW_SHEET_STRUCT_TYPE: { case DRAW_PART_TEXT_STRUCT_TYPE: SaveCopyInUndoList( (SCH_ITEM*) DrawStruct, UR_CHANGED ); case DRAW_BUSENTRY_STRUCT_TYPE: RefreshToolBar = TRUE; wxPostEvent( this, eventMoveItem ); } break; StartMoveTexte( (SCH_TEXT*) DrawStruct, DC ); case DRAW_HIERARCHICAL_PIN_SHEET_STRUCT_TYPE: wxPostEvent( this, eventMovePinsheet ); break; case DRAW_SEGMENT_STRUCT_TYPE: if (((SCH_ITEM*)DrawStruct)->GetLayer() == LAYER_WIRE) wxPostEvent( this, eventDragWire ); break; break; default: default: ; ; } } } break; break; case HK_EDIT_COMPONENT_OR_LABEL: case HK_EDIT_COMPONENT_OR_LABEL: Loading @@ -486,7 +526,7 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey, { { DrawStruct = PickStruct( GetScreen()->m_Curseur, DrawStruct = PickStruct( GetScreen()->m_Curseur, GetScreen(), LIBITEM | TEXTITEM | GetScreen(), LIBITEM | TEXTITEM | LABELITEM ); LABELITEM | SHEETITEM ); if( DrawStruct == NULL ) if( DrawStruct == NULL ) break; break; if( DrawStruct->Type() == TYPE_SCH_COMPONENT ) if( DrawStruct->Type() == TYPE_SCH_COMPONENT ) Loading @@ -495,12 +535,22 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey, break; break; } } if( DrawStruct ) { wxCommandEvent eventEditPinsheet(wxEVT_COMMAND_TOOL_CLICKED, ID_POPUP_SCH_EDIT_SHEET); switch( DrawStruct->Type() ) switch( DrawStruct->Type() ) { { case TYPE_SCH_COMPONENT: case TYPE_SCH_COMPONENT: InstallCmpeditFrame( this, MousePos,(SCH_COMPONENT*) DrawStruct ); InstallCmpeditFrame( this, MousePos,(SCH_COMPONENT*) DrawStruct ); break; break; case DRAW_SHEET_STRUCT_TYPE: GetScreen()->SetCurItem( (SCH_ITEM*) DrawStruct ); wxPostEvent( this, eventEditPinsheet ); break; case TYPE_SCH_TEXT: case TYPE_SCH_TEXT: case TYPE_SCH_LABEL: case TYPE_SCH_LABEL: case TYPE_SCH_GLOBALLABEL: case TYPE_SCH_GLOBALLABEL: Loading @@ -511,6 +561,7 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey, default: default: ; ; } } } break; break; case HK_EDIT_COMPONENT_VALUE: case HK_EDIT_COMPONENT_VALUE: Loading Loading @@ -654,6 +705,18 @@ void WinEDA_LibeditFrame::OnHotKey( wxDC* DC, int hotkey, break; break; case HK_LIBEDIT_ROTATE_PIN: m_drawItem = LocateItemUsingCursor(); if( m_drawItem && m_drawItem->Type() == COMPONENT_PIN_DRAW_TYPE ) { cmd.SetId( ID_LIBEDIT_ROTATE_PIN ); GetEventHandler()->ProcessEvent( cmd ); } break; case HK_DELETE_PIN: case HK_DELETE_PIN: m_drawItem = LocateItemUsingCursor(); m_drawItem = LocateItemUsingCursor(); Loading eeschema/hotkeys.h +3 −2 Original line number Original line Diff line number Diff line Loading @@ -20,18 +20,19 @@ enum hotkey_id_commnand { HK_REPEAT_LAST, HK_REPEAT_LAST, HK_EDIT_PIN, HK_EDIT_PIN, HK_LIBEDIT_MOVE_GRAPHIC_ITEM, HK_LIBEDIT_MOVE_GRAPHIC_ITEM, HK_LIBEDIT_ROTATE_PIN, HK_DELETE_PIN, HK_DELETE_PIN, HK_UNDO, HK_UNDO, HK_REDO, HK_REDO, HK_MOVEBLOCK_TO_DRAGBLOCK, HK_MOVEBLOCK_TO_DRAGBLOCK, HK_ROTATE_COMPONENT_OR_LABEL, HK_ROTATE_COMPONENT_OR_ITEM, HK_EDIT_COMPONENT_OR_LABEL, HK_EDIT_COMPONENT_OR_LABEL, HK_EDIT_COMPONENT_VALUE, HK_EDIT_COMPONENT_VALUE, HK_EDIT_COMPONENT_FOOTPRINT, HK_EDIT_COMPONENT_FOOTPRINT, HK_MIRROR_X_COMPONENT, HK_MIRROR_X_COMPONENT, HK_MIRROR_Y_COMPONENT, HK_MIRROR_Y_COMPONENT, HK_ORIENT_NORMAL_COMPONENT, HK_ORIENT_NORMAL_COMPONENT, HK_MOVE_COMPONENT_OR_LABEL, HK_MOVE_COMPONENT_OR_ITEM, HK_COPY_COMPONENT_OR_LABEL, HK_COPY_COMPONENT_OR_LABEL, HK_DRAG_COMPONENT, HK_DRAG_COMPONENT, HK_ADD_NEW_COMPONENT, HK_ADD_NEW_COMPONENT, Loading eeschema/libedit_onrightclick.cpp +3 −0 Original line number Original line Diff line number Diff line Loading @@ -239,6 +239,9 @@ void AddMenusForPin( wxMenu* PopMenu, msg = AddHotkeyName( _( "Edit Pin " ), s_Libedit_Hokeys_Descr, HK_EDIT_PIN ); msg = AddHotkeyName( _( "Edit Pin " ), s_Libedit_Hokeys_Descr, HK_EDIT_PIN ); ADD_MENUITEM( PopMenu, ID_LIBEDIT_EDIT_PIN, msg, edit_xpm ); ADD_MENUITEM( PopMenu, ID_LIBEDIT_EDIT_PIN, msg, edit_xpm ); msg = AddHotkeyName( _( "Rotate Pin " ), s_Libedit_Hokeys_Descr, HK_LIBEDIT_ROTATE_PIN ); ADD_MENUITEM( PopMenu, ID_LIBEDIT_ROTATE_PIN, msg, rotate_pin_xpm ); if( not_in_move ) if( not_in_move ) { { msg = AddHotkeyName( _( "Delete Pin " ), s_Libedit_Hokeys_Descr, msg = AddHotkeyName( _( "Delete Pin " ), s_Libedit_Hokeys_Descr, Loading Loading
CHANGELOG.txt +10 −0 Original line number Original line Diff line number Diff line Loading @@ -4,6 +4,16 @@ KiCad ChangeLog 2010 Please add newer entries at the top, list the date and your name with Please add newer entries at the top, list the date and your name with email address. email address. 2010-Jan-17 UPDATE Jerry Jacobs <xor.gate.engineering[at]gmail[dot]com> ================================================================================ + EESchema + Added Torsten Huter's patch for hotkeys + Moved recent opened documents to submenu + Pcbnew + Big (re)organisation of pcbframe menubar and cleanup 2010-Jan-13 UPDATE Wayne Stambaugh <stambaughw@verizon.net> 2010-Jan-13 UPDATE Wayne Stambaugh <stambaughw@verizon.net> ================================================================================ ================================================================================ Minor bug fixes, compiler warning fixes and code cleaning. Minor bug fixes, compiler warning fixes and code cleaning. Loading
eeschema/eeschema_id.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -163,6 +163,7 @@ enum id_eeschema_frm /* Library editor context menu IDs */ /* Library editor context menu IDs */ ID_LIBEDIT_EDIT_PIN, ID_LIBEDIT_EDIT_PIN, ID_LIBEDIT_ROTATE_PIN, ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_ITEM, ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_ITEM, ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_PINSIZE_ITEM, ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_PINSIZE_ITEM, ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_PINNAMESIZE_ITEM, ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_PINNAMESIZE_ITEM, Loading
eeschema/hotkeys.cpp +137 −74 Original line number Original line Diff line number Diff line Loading @@ -74,8 +74,8 @@ static Ki_HotkeyInfo HkMirrorXComponent( wxT( "Mirror X Component" ), HK_MIRROR_X_COMPONENT, 'X' ); HK_MIRROR_X_COMPONENT, 'X' ); static Ki_HotkeyInfo HkOrientNormalComponent( wxT( "Orient Normal Component" ), static Ki_HotkeyInfo HkOrientNormalComponent( wxT( "Orient Normal Component" ), HK_ORIENT_NORMAL_COMPONENT, 'N' ); HK_ORIENT_NORMAL_COMPONENT, 'N' ); static Ki_HotkeyInfo HkRotateComponent( wxT( "Rotate Component or Label" ), static Ki_HotkeyInfo HkRotateComponentOrItem( wxT( "Rotate Schematic Item" ), HK_ROTATE_COMPONENT_OR_LABEL, 'R' ); HK_ROTATE_COMPONENT_OR_ITEM, 'R' ); static Ki_HotkeyInfo HkEditComponent( wxT( "Edit Component or Label" ), static Ki_HotkeyInfo HkEditComponent( wxT( "Edit Component or Label" ), HK_EDIT_COMPONENT_OR_LABEL, 'E' ); HK_EDIT_COMPONENT_OR_LABEL, 'E' ); static Ki_HotkeyInfo HkEditComponentValue( wxT( "Edit Component Value" ), static Ki_HotkeyInfo HkEditComponentValue( wxT( "Edit Component Value" ), Loading @@ -83,8 +83,8 @@ static Ki_HotkeyInfo HkEditComponentValue( wxT( "Edit Component Value" ), static Ki_HotkeyInfo HkEditComponentFootprint( wxT( "Edit Component Footprint" ), static Ki_HotkeyInfo HkEditComponentFootprint( wxT( "Edit Component Footprint" ), HK_EDIT_COMPONENT_FOOTPRINT, HK_EDIT_COMPONENT_FOOTPRINT, 'F' ); 'F' ); static Ki_HotkeyInfo HkMoveComponentOrText( wxT( "Move Component or Label" ), static Ki_HotkeyInfo HkMoveComponentOrItem( wxT( "Move Schematic Item" ), HK_MOVE_COMPONENT_OR_LABEL, 'M', HK_MOVE_COMPONENT_OR_ITEM, 'M', ID_POPUP_SCH_MOVE_CMP_REQUEST ); ID_POPUP_SCH_MOVE_CMP_REQUEST ); static Ki_HotkeyInfo HkCopyComponentOrText( wxT( "Copy Component or Label" ), static Ki_HotkeyInfo HkCopyComponentOrText( wxT( "Copy Component or Label" ), Loading @@ -107,6 +107,7 @@ static Ki_HotkeyInfo HkInsertPin( wxT( "Repeat Pin" ), HK_REPEAT_LAST, WXK_INSERT ); WXK_INSERT ); static Ki_HotkeyInfo HkEditPin( wxT( "Edit Pin" ), HK_EDIT_PIN, 'E' ); static Ki_HotkeyInfo HkEditPin( wxT( "Edit Pin" ), HK_EDIT_PIN, 'E' ); static Ki_HotkeyInfo HkMovePin( wxT( "Move Pin" ), HK_LIBEDIT_MOVE_GRAPHIC_ITEM, 'M' ); static Ki_HotkeyInfo HkMovePin( wxT( "Move Pin" ), HK_LIBEDIT_MOVE_GRAPHIC_ITEM, 'M' ); static Ki_HotkeyInfo HkRotatePin( wxT( "Rotate Pin" ), HK_LIBEDIT_ROTATE_PIN, 'R' ); static Ki_HotkeyInfo HkDeletePin( wxT( "Delete Pin" ), HK_DELETE_PIN, static Ki_HotkeyInfo HkDeletePin( wxT( "Delete Pin" ), HK_DELETE_PIN, WXK_DELETE ); WXK_DELETE ); Loading @@ -127,9 +128,9 @@ Ki_HotkeyInfo* s_Schematic_Hotkey_List[] = { { &HkNextSearch, &HkNextSearch, &HkDelete, &HkInsert, &HkMove2Drag, &HkDelete, &HkInsert, &HkMove2Drag, &HkMoveComponentOrText, &HkCopyComponentOrText, &HkMoveComponentOrItem, &HkCopyComponentOrText, &HkDragComponent, &HkAddComponent, &HkDragComponent, &HkAddComponent, &HkRotateComponent, &HkMirrorXComponent, &HkMirrorYComponent, &HkRotateComponentOrItem, &HkMirrorXComponent, &HkMirrorYComponent, &HkOrientNormalComponent, &HkOrientNormalComponent, &HkEditComponent,&HkEditComponentValue,&HkEditComponentFootprint, &HkEditComponent,&HkEditComponentValue,&HkEditComponentFootprint, &HkBeginWire, &HkBeginWire, Loading @@ -143,6 +144,7 @@ Ki_HotkeyInfo* s_LibEdit_Hotkey_List[] = &HkEditPin, &HkEditPin, &HkMovePin, &HkMovePin, &HkDeletePin, &HkDeletePin, &HkRotatePin, NULL NULL }; }; Loading Loading @@ -333,48 +335,54 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey, } } break; break; case HK_ROTATE_COMPONENT_OR_LABEL: // Component Rotation case HK_ROTATE_COMPONENT_OR_ITEM: // Component or other schematic item rotation if( DrawStruct == NULL ) if( DrawStruct == NULL ) { { DrawStruct = PickStruct( GetScreen()->m_Curseur, // Find the schematic object to rotate under the cursor GetScreen(), LIBITEM | TEXTITEM | DrawStruct = SchematicGeneralLocateAndDisplay( false ); LABELITEM ); if( DrawStruct == NULL ) if( DrawStruct == NULL ) break; break; if( DrawStruct->Type() == TYPE_SCH_COMPONENT ) if( DrawStruct->Type() == TYPE_SCH_COMPONENT ) DrawStruct = LocateSmallestComponent( GetScreen() ); DrawStruct = LocateSmallestComponent( GetScreen() ); if( DrawStruct == NULL ) if( DrawStruct == NULL ) break; break; } } if (DrawStruct) { GetScreen()->SetCurItem( (SCH_ITEM*) DrawStruct ); // Create the events for rotating a component or other schematic item wxCommandEvent eventRotateComponent( wxEVT_COMMAND_TOOL_CLICKED, ID_POPUP_SCH_ROTATE_CMP_COUNTERCLOCKWISE ); wxCommandEvent eventRotateText(wxEVT_COMMAND_TOOL_CLICKED, ID_POPUP_SCH_ROTATE_TEXT ); wxCommandEvent eventRotateField(wxEVT_COMMAND_TOOL_CLICKED, ID_POPUP_SCH_ROTATE_FIELD ); switch( DrawStruct->Type() ) switch( DrawStruct->Type() ) { { case TYPE_SCH_COMPONENT: case TYPE_SCH_COMPONENT: if( DrawStruct->m_Flags == 0 ) wxPostEvent( this, eventRotateComponent ); { SaveCopyInUndoList( (SCH_ITEM*) DrawStruct, UR_CHANGED ); RefreshToolBar = TRUE; } CmpRotationMiroir( (SCH_COMPONENT*) DrawStruct, DC, CMP_ROTATE_COUNTERCLOCKWISE ); break; break; case TYPE_SCH_TEXT: case TYPE_SCH_TEXT: case TYPE_SCH_LABEL: case TYPE_SCH_LABEL: case TYPE_SCH_GLOBALLABEL: case TYPE_SCH_GLOBALLABEL: case TYPE_SCH_HIERLABEL: case TYPE_SCH_HIERLABEL: if( DrawStruct->m_Flags == 0 ) wxPostEvent( this, eventRotateText ); { SaveCopyInUndoList( (SCH_ITEM*) DrawStruct, UR_CHANGED ); RefreshToolBar = TRUE; } ChangeTextOrient( (SCH_TEXT*) DrawStruct, DC ); break; break; case DRAW_PART_TEXT_STRUCT_TYPE: wxPostEvent( this, eventRotateField ); default: default: ; ; } } } break; break; Loading Loading @@ -422,20 +430,33 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey, break; break; case HK_DRAG_COMPONENT: // Start drag component case HK_DRAG_COMPONENT: // Start drag component case HK_MOVE_COMPONENT_OR_LABEL: // Start move component or text/label case HK_MOVE_COMPONENT_OR_ITEM: // Start move component or other schematic item case HK_COPY_COMPONENT_OR_LABEL: // Duplicate component or text/label case HK_COPY_COMPONENT_OR_LABEL: // Duplicate component or text/label if( ItemInEdit ) if( ItemInEdit ) break; break; if( DrawStruct == NULL ) if( DrawStruct == NULL ) { { DrawStruct = PickStruct( GetScreen()->m_Curseur, // Find the schematic object to move under the cursor GetScreen(), LIBITEM | TEXTITEM | DrawStruct = SchematicGeneralLocateAndDisplay( false ); LABELITEM ); if( DrawStruct == NULL ) if( DrawStruct == NULL ) break; break; if( DrawStruct->Type() == TYPE_SCH_COMPONENT ) if( DrawStruct->Type() == TYPE_SCH_COMPONENT ) DrawStruct = LocateSmallestComponent( GetScreen() ); DrawStruct = LocateSmallestComponent( GetScreen() ); if( DrawStruct->Type() == DRAW_SHEET_STRUCT_TYPE ){ // If it's a sheet, then check if a pinsheet is under the cursor SCH_SHEET_PIN* slabel = LocateSheetLabel( (SCH_SHEET*) DrawStruct, GetScreen()->m_Curseur ); if (slabel) DrawStruct = slabel; } if (DrawStruct->Type() == DRAW_JUNCTION_STRUCT_TYPE){ // If it's a junction, pick the underlying wire instead DrawStruct = PickStruct( GetScreen()->m_Curseur, GetScreen(), WIREITEM); } if( DrawStruct == NULL ) if( DrawStruct == NULL ) break; break; } } Loading @@ -449,33 +470,52 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey, break; break; } } if( DrawStruct && (DrawStruct->m_Flags == 0) ){ GetScreen()->SetCurItem( (SCH_ITEM*) DrawStruct ); // Create the events for moving a component or other schematic item wxCommandEvent eventMoveComponent( wxEVT_COMMAND_TOOL_CLICKED, HK_Descr->m_IdMenuEvent ); wxCommandEvent eventMoveItem(wxEVT_COMMAND_TOOL_CLICKED, ID_POPUP_SCH_MOVE_ITEM_REQUEST ); wxCommandEvent eventMovePinsheet(wxEVT_COMMAND_TOOL_CLICKED, ID_POPUP_SCH_MOVE_PINSHEET); wxCommandEvent eventDragWire(wxEVT_COMMAND_TOOL_CLICKED, ID_POPUP_SCH_DRAG_WIRE_REQUEST); switch( DrawStruct->Type() ) switch( DrawStruct->Type() ) { { // select the correct event for moving an schematic object // and add it to the event queue case TYPE_SCH_COMPONENT: case TYPE_SCH_COMPONENT: if( DrawStruct && (DrawStruct->m_Flags ==0) ) wxPostEvent( this, eventMoveComponent ); { GetScreen()->SetCurItem( (SCH_ITEM*) DrawStruct ); wxCommandEvent event( wxEVT_COMMAND_TOOL_CLICKED, HK_Descr->m_IdMenuEvent ); wxPostEvent( this, event ); } break; break; case TYPE_SCH_TEXT: case TYPE_SCH_TEXT: case TYPE_SCH_LABEL: case TYPE_SCH_LABEL: case TYPE_SCH_GLOBALLABEL: case TYPE_SCH_GLOBALLABEL: case TYPE_SCH_HIERLABEL: case TYPE_SCH_HIERLABEL: if( DrawStruct->m_Flags == 0 ) case DRAW_SHEET_STRUCT_TYPE: { case DRAW_PART_TEXT_STRUCT_TYPE: SaveCopyInUndoList( (SCH_ITEM*) DrawStruct, UR_CHANGED ); case DRAW_BUSENTRY_STRUCT_TYPE: RefreshToolBar = TRUE; wxPostEvent( this, eventMoveItem ); } break; StartMoveTexte( (SCH_TEXT*) DrawStruct, DC ); case DRAW_HIERARCHICAL_PIN_SHEET_STRUCT_TYPE: wxPostEvent( this, eventMovePinsheet ); break; case DRAW_SEGMENT_STRUCT_TYPE: if (((SCH_ITEM*)DrawStruct)->GetLayer() == LAYER_WIRE) wxPostEvent( this, eventDragWire ); break; break; default: default: ; ; } } } break; break; case HK_EDIT_COMPONENT_OR_LABEL: case HK_EDIT_COMPONENT_OR_LABEL: Loading @@ -486,7 +526,7 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey, { { DrawStruct = PickStruct( GetScreen()->m_Curseur, DrawStruct = PickStruct( GetScreen()->m_Curseur, GetScreen(), LIBITEM | TEXTITEM | GetScreen(), LIBITEM | TEXTITEM | LABELITEM ); LABELITEM | SHEETITEM ); if( DrawStruct == NULL ) if( DrawStruct == NULL ) break; break; if( DrawStruct->Type() == TYPE_SCH_COMPONENT ) if( DrawStruct->Type() == TYPE_SCH_COMPONENT ) Loading @@ -495,12 +535,22 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey, break; break; } } if( DrawStruct ) { wxCommandEvent eventEditPinsheet(wxEVT_COMMAND_TOOL_CLICKED, ID_POPUP_SCH_EDIT_SHEET); switch( DrawStruct->Type() ) switch( DrawStruct->Type() ) { { case TYPE_SCH_COMPONENT: case TYPE_SCH_COMPONENT: InstallCmpeditFrame( this, MousePos,(SCH_COMPONENT*) DrawStruct ); InstallCmpeditFrame( this, MousePos,(SCH_COMPONENT*) DrawStruct ); break; break; case DRAW_SHEET_STRUCT_TYPE: GetScreen()->SetCurItem( (SCH_ITEM*) DrawStruct ); wxPostEvent( this, eventEditPinsheet ); break; case TYPE_SCH_TEXT: case TYPE_SCH_TEXT: case TYPE_SCH_LABEL: case TYPE_SCH_LABEL: case TYPE_SCH_GLOBALLABEL: case TYPE_SCH_GLOBALLABEL: Loading @@ -511,6 +561,7 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey, default: default: ; ; } } } break; break; case HK_EDIT_COMPONENT_VALUE: case HK_EDIT_COMPONENT_VALUE: Loading Loading @@ -654,6 +705,18 @@ void WinEDA_LibeditFrame::OnHotKey( wxDC* DC, int hotkey, break; break; case HK_LIBEDIT_ROTATE_PIN: m_drawItem = LocateItemUsingCursor(); if( m_drawItem && m_drawItem->Type() == COMPONENT_PIN_DRAW_TYPE ) { cmd.SetId( ID_LIBEDIT_ROTATE_PIN ); GetEventHandler()->ProcessEvent( cmd ); } break; case HK_DELETE_PIN: case HK_DELETE_PIN: m_drawItem = LocateItemUsingCursor(); m_drawItem = LocateItemUsingCursor(); Loading
eeschema/hotkeys.h +3 −2 Original line number Original line Diff line number Diff line Loading @@ -20,18 +20,19 @@ enum hotkey_id_commnand { HK_REPEAT_LAST, HK_REPEAT_LAST, HK_EDIT_PIN, HK_EDIT_PIN, HK_LIBEDIT_MOVE_GRAPHIC_ITEM, HK_LIBEDIT_MOVE_GRAPHIC_ITEM, HK_LIBEDIT_ROTATE_PIN, HK_DELETE_PIN, HK_DELETE_PIN, HK_UNDO, HK_UNDO, HK_REDO, HK_REDO, HK_MOVEBLOCK_TO_DRAGBLOCK, HK_MOVEBLOCK_TO_DRAGBLOCK, HK_ROTATE_COMPONENT_OR_LABEL, HK_ROTATE_COMPONENT_OR_ITEM, HK_EDIT_COMPONENT_OR_LABEL, HK_EDIT_COMPONENT_OR_LABEL, HK_EDIT_COMPONENT_VALUE, HK_EDIT_COMPONENT_VALUE, HK_EDIT_COMPONENT_FOOTPRINT, HK_EDIT_COMPONENT_FOOTPRINT, HK_MIRROR_X_COMPONENT, HK_MIRROR_X_COMPONENT, HK_MIRROR_Y_COMPONENT, HK_MIRROR_Y_COMPONENT, HK_ORIENT_NORMAL_COMPONENT, HK_ORIENT_NORMAL_COMPONENT, HK_MOVE_COMPONENT_OR_LABEL, HK_MOVE_COMPONENT_OR_ITEM, HK_COPY_COMPONENT_OR_LABEL, HK_COPY_COMPONENT_OR_LABEL, HK_DRAG_COMPONENT, HK_DRAG_COMPONENT, HK_ADD_NEW_COMPONENT, HK_ADD_NEW_COMPONENT, Loading
eeschema/libedit_onrightclick.cpp +3 −0 Original line number Original line Diff line number Diff line Loading @@ -239,6 +239,9 @@ void AddMenusForPin( wxMenu* PopMenu, msg = AddHotkeyName( _( "Edit Pin " ), s_Libedit_Hokeys_Descr, HK_EDIT_PIN ); msg = AddHotkeyName( _( "Edit Pin " ), s_Libedit_Hokeys_Descr, HK_EDIT_PIN ); ADD_MENUITEM( PopMenu, ID_LIBEDIT_EDIT_PIN, msg, edit_xpm ); ADD_MENUITEM( PopMenu, ID_LIBEDIT_EDIT_PIN, msg, edit_xpm ); msg = AddHotkeyName( _( "Rotate Pin " ), s_Libedit_Hokeys_Descr, HK_LIBEDIT_ROTATE_PIN ); ADD_MENUITEM( PopMenu, ID_LIBEDIT_ROTATE_PIN, msg, rotate_pin_xpm ); if( not_in_move ) if( not_in_move ) { { msg = AddHotkeyName( _( "Delete Pin " ), s_Libedit_Hokeys_Descr, msg = AddHotkeyName( _( "Delete Pin " ), s_Libedit_Hokeys_Descr, Loading