Commit 73f83c05 authored by jerryjacobs's avatar jerryjacobs

See CHANGELOG.txt

parent bf02bc4d
...@@ -4,6 +4,16 @@ KiCad ChangeLog 2010 ...@@ -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.
......
...@@ -163,6 +163,7 @@ enum id_eeschema_frm ...@@ -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,
......
This diff is collapsed.
...@@ -20,18 +20,19 @@ enum hotkey_id_commnand { ...@@ -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,
......
...@@ -239,6 +239,9 @@ void AddMenusForPin( wxMenu* PopMenu, ...@@ -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,
......
...@@ -54,6 +54,7 @@ public: ...@@ -54,6 +54,7 @@ public:
void OnCheckComponent( wxCommandEvent& event ); void OnCheckComponent( wxCommandEvent& event );
void OnSelectBodyStyle( wxCommandEvent& event ); void OnSelectBodyStyle( wxCommandEvent& event );
void OnEditPin( wxCommandEvent& event ); void OnEditPin( wxCommandEvent& event );
void OnRotatePin( wxCommandEvent& event );
void OnUpdateEditingPart( wxUpdateUIEvent& event ); void OnUpdateEditingPart( wxUpdateUIEvent& event );
void OnUpdateNotEditingPart( wxUpdateUIEvent& event ); void OnUpdateNotEditingPart( wxUpdateUIEvent& event );
......
...@@ -115,6 +115,8 @@ BEGIN_EVENT_TABLE( WinEDA_LibeditFrame, WinEDA_DrawFrame ) ...@@ -115,6 +115,8 @@ BEGIN_EVENT_TABLE( WinEDA_LibeditFrame, WinEDA_DrawFrame )
/* Context menu events and commands. */ /* Context menu events and commands. */
EVT_MENU( ID_LIBEDIT_EDIT_PIN, WinEDA_LibeditFrame::OnEditPin ) EVT_MENU( ID_LIBEDIT_EDIT_PIN, WinEDA_LibeditFrame::OnEditPin )
EVT_MENU( ID_LIBEDIT_ROTATE_PIN, WinEDA_LibeditFrame::OnRotatePin )
EVT_MENU_RANGE( ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_ITEM, EVT_MENU_RANGE( ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_ITEM,
ID_POPUP_LIBEDIT_ROTATE_GRAPHIC_TEXT, ID_POPUP_LIBEDIT_ROTATE_GRAPHIC_TEXT,
WinEDA_LibeditFrame::Process_Special_Functions ) WinEDA_LibeditFrame::Process_Special_Functions )
......
...@@ -412,6 +412,12 @@ bool IsItemInBox( EDA_Rect& aBox, SCH_ITEM* DrawStruct ) ...@@ -412,6 +412,12 @@ bool IsItemInBox( EDA_Rect& aBox, SCH_ITEM* DrawStruct )
break; break;
case DRAW_JUNCTION_STRUCT_TYPE: case DRAW_JUNCTION_STRUCT_TYPE:
#undef STRUCT
#define STRUCT ( (SCH_JUNCTION*) DrawStruct )
if( aBox.Inside(STRUCT->m_Pos) )
return true;
break;
case DRAW_NOCONNECT_STRUCT_TYPE: case DRAW_NOCONNECT_STRUCT_TYPE:
case TYPE_SCH_LABEL: case TYPE_SCH_LABEL:
case TYPE_SCH_TEXT: case TYPE_SCH_TEXT:
......
...@@ -49,13 +49,12 @@ void WinEDA_SchematicFrame::ReCreateMenuBar() ...@@ -49,13 +49,12 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
item->SetBitmap( open_xpm ); item->SetBitmap( open_xpm );
filesMenu->Append( item ); filesMenu->Append( item );
filesMenu->AppendSeparator(); /* Open Recent submenu */
item = new wxMenuItem( filesMenu, ID_SAVE_PROJECT, _( "&Save Project" ), wxMenu* openRecentMenu = new wxMenu();
_( "Save all sheets in the schematic project" ) ); wxGetApp().m_fileHistory.AddFilesToMenu( openRecentMenu );
item->SetBitmap( save_project_xpm ); filesMenu->AppendSubMenu( openRecentMenu, _( "Open &Recent" ),
filesMenu->Append( item ); _( "Open a recent opened document" ) );
filesMenu->AppendSeparator();
item = new wxMenuItem( filesMenu, ID_SAVE_ONE_SHEET, _( "&Save" ), item = new wxMenuItem( filesMenu, ID_SAVE_ONE_SHEET, _( "&Save" ),
_( "Save only current schematic sheet" ) ); _( "Save only current schematic sheet" ) );
item->SetBitmap( save_xpm ); item->SetBitmap( save_xpm );
...@@ -66,8 +65,15 @@ void WinEDA_SchematicFrame::ReCreateMenuBar() ...@@ -66,8 +65,15 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
item->SetBitmap( save_as_xpm ); item->SetBitmap( save_as_xpm );
filesMenu->Append( item ); filesMenu->Append( item );
// Print and Plot section:
filesMenu->AppendSeparator(); filesMenu->AppendSeparator();
item = new wxMenuItem( filesMenu, ID_SAVE_PROJECT, _( "&Save Project" ),
_( "Save all sheets in the schematic project" ) );
item->SetBitmap( save_project_xpm );
filesMenu->Append( item );
filesMenu->AppendSeparator();
// Print and Plot section:
item = new wxMenuItem( filesMenu, ID_GEN_PRINT, _( "P&rint" ), item = new wxMenuItem( filesMenu, ID_GEN_PRINT, _( "P&rint" ),
_( "Print schematic sheet" ) ); _( "Print schematic sheet" ) );
item->SetBitmap( print_button ); item->SetBitmap( print_button );
...@@ -116,8 +122,7 @@ void WinEDA_SchematicFrame::ReCreateMenuBar() ...@@ -116,8 +122,7 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
item->SetBitmap( exit_xpm ); item->SetBitmap( exit_xpm );
filesMenu->Append( item ); filesMenu->Append( item );
/* Add the file history */
wxGetApp().m_fileHistory.AddFilesToMenu( filesMenu );
// Menu Edit: // Menu Edit:
wxMenu* editMenu = new wxMenu; wxMenu* editMenu = new wxMenu;
......
...@@ -15,6 +15,9 @@ ...@@ -15,6 +15,9 @@
#include "protos.h" #include "protos.h"
#include "hotkeys.h" #include "hotkeys.h"
#include "class_library.h" #include "class_library.h"
#include <iostream>
using namespace std;
static void AddMenusForBlock( wxMenu* PopMenu, WinEDA_SchematicFrame* frame ); static void AddMenusForBlock( wxMenu* PopMenu, WinEDA_SchematicFrame* frame );
...@@ -57,10 +60,17 @@ bool WinEDA_SchematicFrame::OnRightClick( const wxPoint& MousePos, ...@@ -57,10 +60,17 @@ bool WinEDA_SchematicFrame::OnRightClick( const wxPoint& MousePos,
return true; return true;
} }
if (DrawStruct)
cout << "Drawstruct Type before: " << DrawStruct -> Type() << endl;
// Try to locate items at cursor position. // Try to locate items at cursor position.
if( (DrawStruct == NULL) || (DrawStruct->m_Flags == 0) ) if( (DrawStruct == NULL) || (DrawStruct->m_Flags == 0) )
{ {
DrawStruct = SchematicGeneralLocateAndDisplay( false ); DrawStruct = SchematicGeneralLocateAndDisplay( false );
if (DrawStruct)
cout << "Drawstruct Type locate : " << DrawStruct -> Type() << endl;
if( DrawStruct && (DrawStruct->Type() == DRAW_SHEET_STRUCT_TYPE) ) if( DrawStruct && (DrawStruct->Type() == DRAW_SHEET_STRUCT_TYPE) )
{ {
SCH_SHEET_PIN* slabel; SCH_SHEET_PIN* slabel;
...@@ -71,6 +81,9 @@ bool WinEDA_SchematicFrame::OnRightClick( const wxPoint& MousePos, ...@@ -71,6 +81,9 @@ bool WinEDA_SchematicFrame::OnRightClick( const wxPoint& MousePos,
} }
} }
if (DrawStruct)
cout << "Drawstruct Type : " << DrawStruct -> Type() << endl;
// If Command in progress: add "cancel" and "end tool" menu // If Command in progress: add "cancel" and "end tool" menu
if( m_ID_current_state ) if( m_ID_current_state )
{ {
...@@ -125,9 +138,13 @@ bool WinEDA_SchematicFrame::OnRightClick( const wxPoint& MousePos, ...@@ -125,9 +138,13 @@ bool WinEDA_SchematicFrame::OnRightClick( const wxPoint& MousePos,
break; break;
case DRAW_BUSENTRY_STRUCT_TYPE: case DRAW_BUSENTRY_STRUCT_TYPE:
if( !flags ) if( !flags ){
wxString msg = AddHotkeyName( _( "Move Bus Entry" ),
s_Schematic_Hokeys_Descr, HK_MOVE_COMPONENT_OR_ITEM );
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_ITEM_REQUEST, ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_ITEM_REQUEST,
_( "Move Bus Entry" ), move_xpm ); msg, move_xpm );
}
if( GetBusEntryShape( (SCH_BUS_ENTRY*) DrawStruct ) == '\\' ) if( GetBusEntryShape( (SCH_BUS_ENTRY*) DrawStruct ) == '\\' )
PopMenu->Append( ID_POPUP_SCH_ENTRY_SELECT_SLASH, PopMenu->Append( ID_POPUP_SCH_ENTRY_SELECT_SLASH,
_( "Set Bus Entry /" ) ); _( "Set Bus Entry /" ) );
...@@ -229,11 +246,19 @@ DrawType %d" ), ...@@ -229,11 +246,19 @@ DrawType %d" ),
void AddMenusForComponentField( wxMenu* PopMenu, SCH_FIELD* Field ) void AddMenusForComponentField( wxMenu* PopMenu, SCH_FIELD* Field )
{ {
if( !Field->m_Flags ) wxString msg;
if( !Field->m_Flags ){
msg = AddHotkeyName( _( "Move Field" ),
s_Schematic_Hokeys_Descr, HK_MOVE_COMPONENT_OR_ITEM );
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_ITEM_REQUEST, ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_ITEM_REQUEST,
_( "Move Field" ), move_text_xpm ); msg, move_text_xpm );
}
msg = AddHotkeyName( _( "Rotate Field" ),
s_Schematic_Hokeys_Descr, HK_ROTATE_COMPONENT_OR_ITEM );
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ROTATE_FIELD, ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ROTATE_FIELD,
_( "Rotate Field" ), rotate_field_xpm ); msg, rotate_field_xpm );
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_EDIT_FIELD, ADD_MENUITEM( PopMenu, ID_POPUP_SCH_EDIT_FIELD,
_( "Edit Field" ), edit_text_xpm ); _( "Edit Field" ), edit_text_xpm );
} }
...@@ -265,7 +290,7 @@ void AddMenusForComponent( wxMenu* PopMenu, SCH_COMPONENT* Component ) ...@@ -265,7 +290,7 @@ void AddMenusForComponent( wxMenu* PopMenu, SCH_COMPONENT* Component )
{ {
msg = _( "Move Component" ); msg = _( "Move Component" );
msg << wxT( " " ) << Component->GetField( REFERENCE )->m_Text; msg << wxT( " " ) << Component->GetField( REFERENCE )->m_Text;
msg = AddHotkeyName( msg, s_Schematic_Hokeys_Descr, HK_MOVE_COMPONENT_OR_LABEL ); msg = AddHotkeyName( msg, s_Schematic_Hokeys_Descr, HK_MOVE_COMPONENT_OR_ITEM );
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_CMP_REQUEST, ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_CMP_REQUEST,
msg, move_xpm ); msg, move_xpm );
msg = AddHotkeyName( _( "Drag Component" ), s_Schematic_Hokeys_Descr, msg = AddHotkeyName( _( "Drag Component" ), s_Schematic_Hokeys_Descr,
...@@ -276,7 +301,7 @@ void AddMenusForComponent( wxMenu* PopMenu, SCH_COMPONENT* Component ) ...@@ -276,7 +301,7 @@ void AddMenusForComponent( wxMenu* PopMenu, SCH_COMPONENT* Component )
wxMenu* orientmenu = new wxMenu; wxMenu* orientmenu = new wxMenu;
msg = AddHotkeyName( _( "Rotate +" ), s_Schematic_Hokeys_Descr, msg = AddHotkeyName( _( "Rotate +" ), s_Schematic_Hokeys_Descr,
HK_ROTATE_COMPONENT_OR_LABEL ); HK_ROTATE_COMPONENT_OR_ITEM );
ADD_MENUITEM( orientmenu, ID_POPUP_SCH_ROTATE_CMP_COUNTERCLOCKWISE, ADD_MENUITEM( orientmenu, ID_POPUP_SCH_ROTATE_CMP_COUNTERCLOCKWISE,
msg, rotate_pos_xpm ); msg, rotate_pos_xpm );
ADD_MENUITEM( orientmenu, ID_POPUP_SCH_ROTATE_CMP_CLOCKWISE, ADD_MENUITEM( orientmenu, ID_POPUP_SCH_ROTATE_CMP_CLOCKWISE,
...@@ -367,7 +392,7 @@ void AddMenusForGLabel( wxMenu* PopMenu, SCH_GLOBALLABEL* GLabel ) ...@@ -367,7 +392,7 @@ void AddMenusForGLabel( wxMenu* PopMenu, SCH_GLOBALLABEL* GLabel )
if( !GLabel->m_Flags ) if( !GLabel->m_Flags )
{ {
msg = AddHotkeyName( _( "Move Global Label" ), msg = AddHotkeyName( _( "Move Global Label" ),
s_Schematic_Hokeys_Descr, HK_MOVE_COMPONENT_OR_LABEL ); s_Schematic_Hokeys_Descr, HK_MOVE_COMPONENT_OR_ITEM );
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_ITEM_REQUEST, ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_ITEM_REQUEST,
msg, move_text_xpm ); msg, move_text_xpm );
msg = AddHotkeyName( _( "Copy Global Label" ), msg = AddHotkeyName( _( "Copy Global Label" ),
...@@ -377,7 +402,7 @@ void AddMenusForGLabel( wxMenu* PopMenu, SCH_GLOBALLABEL* GLabel ) ...@@ -377,7 +402,7 @@ void AddMenusForGLabel( wxMenu* PopMenu, SCH_GLOBALLABEL* GLabel )
msg, copy_button ); msg, copy_button );
} }
msg = AddHotkeyName( _( "Rotate Global Label" ), s_Schematic_Hokeys_Descr, msg = AddHotkeyName( _( "Rotate Global Label" ), s_Schematic_Hokeys_Descr,
HK_ROTATE_COMPONENT_OR_LABEL ); HK_ROTATE_COMPONENT_OR_ITEM );
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ROTATE_TEXT, ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ROTATE_TEXT,
msg, rotate_glabel_xpm ); msg, rotate_glabel_xpm );
msg = AddHotkeyName( _( "Edit Global Label" ), s_Schematic_Hokeys_Descr, msg = AddHotkeyName( _( "Edit Global Label" ), s_Schematic_Hokeys_Descr,
...@@ -411,7 +436,7 @@ void AddMenusForHLabel( wxMenu* PopMenu, SCH_HIERLABEL* HLabel ) ...@@ -411,7 +436,7 @@ void AddMenusForHLabel( wxMenu* PopMenu, SCH_HIERLABEL* HLabel )
{ {
msg = AddHotkeyName( _( "Move Hierarchical Label" ), msg = AddHotkeyName( _( "Move Hierarchical Label" ),
s_Schematic_Hokeys_Descr, s_Schematic_Hokeys_Descr,
HK_MOVE_COMPONENT_OR_LABEL ); HK_MOVE_COMPONENT_OR_ITEM );
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_ITEM_REQUEST, ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_ITEM_REQUEST,
msg, move_text_xpm ); msg, move_text_xpm );
msg = AddHotkeyName( _( "Copy Hierarchical Label" ), msg = AddHotkeyName( _( "Copy Hierarchical Label" ),
...@@ -421,7 +446,7 @@ void AddMenusForHLabel( wxMenu* PopMenu, SCH_HIERLABEL* HLabel ) ...@@ -421,7 +446,7 @@ void AddMenusForHLabel( wxMenu* PopMenu, SCH_HIERLABEL* HLabel )
msg, copy_button ); msg, copy_button );
} }
msg = AddHotkeyName( _( "Rotate Hierarchical Label" ), s_Schematic_Hokeys_Descr, msg = AddHotkeyName( _( "Rotate Hierarchical Label" ), s_Schematic_Hokeys_Descr,
HK_ROTATE_COMPONENT_OR_LABEL ); HK_ROTATE_COMPONENT_OR_ITEM );
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ROTATE_TEXT, ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ROTATE_TEXT,
_( "Rotate Hierarchical Label" ), rotate_glabel_xpm ); _( "Rotate Hierarchical Label" ), rotate_glabel_xpm );
msg = AddHotkeyName( _( "Edit Hierarchical Label" ), s_Schematic_Hokeys_Descr, msg = AddHotkeyName( _( "Edit Hierarchical Label" ), s_Schematic_Hokeys_Descr,
...@@ -454,7 +479,7 @@ void AddMenusForLabel( wxMenu* PopMenu, SCH_LABEL* Label ) ...@@ -454,7 +479,7 @@ void AddMenusForLabel( wxMenu* PopMenu, SCH_LABEL* Label )
if( !Label->m_Flags ) if( !Label->m_Flags )
{ {
msg = AddHotkeyName( _( "Move Label" ), s_Schematic_Hokeys_Descr, msg = AddHotkeyName( _( "Move Label" ), s_Schematic_Hokeys_Descr,
HK_MOVE_COMPONENT_OR_LABEL ); HK_MOVE_COMPONENT_OR_ITEM );
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_ITEM_REQUEST, ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_ITEM_REQUEST,
msg, move_text_xpm ); msg, move_text_xpm );
msg = AddHotkeyName( _( "Copy Label" ), msg = AddHotkeyName( _( "Copy Label" ),
...@@ -464,7 +489,7 @@ void AddMenusForLabel( wxMenu* PopMenu, SCH_LABEL* Label ) ...@@ -464,7 +489,7 @@ void AddMenusForLabel( wxMenu* PopMenu, SCH_LABEL* Label )
msg, copy_button ); msg, copy_button );
} }
msg = AddHotkeyName( _( "Rotate Label" ), s_Schematic_Hokeys_Descr, msg = AddHotkeyName( _( "Rotate Label" ), s_Schematic_Hokeys_Descr,
HK_ROTATE_COMPONENT_OR_LABEL ); HK_ROTATE_COMPONENT_OR_ITEM );
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ROTATE_TEXT, ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ROTATE_TEXT,
msg, rotate_pos_xpm ); msg, rotate_pos_xpm );
msg = AddHotkeyName( _( "Edit Label" ), s_Schematic_Hokeys_Descr, msg = AddHotkeyName( _( "Edit Label" ), s_Schematic_Hokeys_Descr,
...@@ -498,7 +523,7 @@ void AddMenusForText( wxMenu* PopMenu, SCH_TEXT* Text ) ...@@ -498,7 +523,7 @@ void AddMenusForText( wxMenu* PopMenu, SCH_TEXT* Text )
{ {
msg = AddHotkeyName( _( "Move Text" ), msg = AddHotkeyName( _( "Move Text" ),
s_Schematic_Hokeys_Descr, s_Schematic_Hokeys_Descr,
HK_MOVE_COMPONENT_OR_LABEL ); HK_MOVE_COMPONENT_OR_ITEM );
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_ITEM_REQUEST, ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_ITEM_REQUEST,
msg, move_text_xpm ); msg, move_text_xpm );
msg = AddHotkeyName( _( "Copy Text" ), msg = AddHotkeyName( _( "Copy Text" ),
...@@ -508,7 +533,7 @@ void AddMenusForText( wxMenu* PopMenu, SCH_TEXT* Text ) ...@@ -508,7 +533,7 @@ void AddMenusForText( wxMenu* PopMenu, SCH_TEXT* Text )
msg, copy_button ); msg, copy_button );
} }
msg = AddHotkeyName( _( "Rotate Text" ), s_Schematic_Hokeys_Descr, msg = AddHotkeyName( _( "Rotate Text" ), s_Schematic_Hokeys_Descr,
HK_ROTATE_COMPONENT_OR_LABEL ); HK_ROTATE_COMPONENT_OR_ITEM );
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ROTATE_TEXT, msg, ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ROTATE_TEXT, msg,
rotate_pos_xpm ); rotate_pos_xpm );
msg = AddHotkeyName( _( "Edit Text" ), s_Schematic_Hokeys_Descr, msg = AddHotkeyName( _( "Edit Text" ), s_Schematic_Hokeys_Descr,
...@@ -584,7 +609,9 @@ void AddMenusForWire( wxMenu* PopMenu, SCH_LINE* Wire, ...@@ -584,7 +609,9 @@ void AddMenusForWire( wxMenu* PopMenu, SCH_LINE* Wire,
return; return;
} }
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DRAG_WIRE_REQUEST, _( "Drag Wire" ), msg = AddHotkeyName( _( "Drag Wire" ), s_Schematic_Hokeys_Descr,
HK_DRAG_COMPONENT );
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DRAG_WIRE_REQUEST, msg,
move_track_xpm ); move_track_xpm );
PopMenu->AppendSeparator(); PopMenu->AppendSeparator();
msg = AddHotkeyName( _( "Delete Wire" ), s_Schematic_Hokeys_Descr, msg = AddHotkeyName( _( "Delete Wire" ), s_Schematic_Hokeys_Descr,
...@@ -649,13 +676,17 @@ void AddMenusForBus( wxMenu* PopMenu, SCH_LINE* Bus, ...@@ -649,13 +676,17 @@ void AddMenusForBus( wxMenu* PopMenu, SCH_LINE* Bus,
void AddMenusForHierchicalSheet( wxMenu* PopMenu, SCH_SHEET* Sheet ) void AddMenusForHierchicalSheet( wxMenu* PopMenu, SCH_SHEET* Sheet )
{ {
wxString msg;
if( !Sheet->m_Flags ) if( !Sheet->m_Flags )
{ {
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ENTER_SHEET, ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ENTER_SHEET,
_( "Enter Sheet" ), enter_sheet_xpm ); _( "Enter Sheet" ), enter_sheet_xpm );
PopMenu->AppendSeparator(); PopMenu->AppendSeparator();
msg = AddHotkeyName( _( "Move Sheet" ),
s_Schematic_Hokeys_Descr, HK_MOVE_COMPONENT_OR_ITEM );
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_ITEM_REQUEST, ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_ITEM_REQUEST,
_( "Move Sheet" ), move_sheet_xpm ); msg, move_sheet_xpm );
} }
if( Sheet->m_Flags ) if( Sheet->m_Flags )
...@@ -665,8 +696,12 @@ void AddMenusForHierchicalSheet( wxMenu* PopMenu, SCH_SHEET* Sheet ) ...@@ -665,8 +696,12 @@ void AddMenusForHierchicalSheet( wxMenu* PopMenu, SCH_SHEET* Sheet )
} }
else else
{ {
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_EDIT_SHEET, _( "Edit Sheet" ), msg = AddHotkeyName( _( "Edit Sheet" ),
s_Schematic_Hokeys_Descr, HK_EDIT_COMPONENT_OR_LABEL );
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_EDIT_SHEET, msg,
edit_sheet_xpm ); edit_sheet_xpm );
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_RESIZE_SHEET, _( "Resize Sheet" ), ADD_MENUITEM( PopMenu, ID_POPUP_SCH_RESIZE_SHEET, _( "Resize Sheet" ),
resize_sheet_xpm ); resize_sheet_xpm );
PopMenu->AppendSeparator(); PopMenu->AppendSeparator();
...@@ -684,9 +719,14 @@ void AddMenusForHierchicalSheet( wxMenu* PopMenu, SCH_SHEET* Sheet ) ...@@ -684,9 +719,14 @@ void AddMenusForHierchicalSheet( wxMenu* PopMenu, SCH_SHEET* Sheet )
void AddMenusForPinSheet( wxMenu* PopMenu, SCH_SHEET_PIN* PinSheet ) void AddMenusForPinSheet( wxMenu* PopMenu, SCH_SHEET_PIN* PinSheet )
{ {
if( !PinSheet->m_Flags ) wxString msg;
if( !PinSheet->m_Flags ){
msg = AddHotkeyName( _( "Move PinSheet" ),
s_Schematic_Hokeys_Descr, HK_MOVE_COMPONENT_OR_ITEM );
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_PINSHEET, ADD_MENUITEM( PopMenu, ID_POPUP_SCH_MOVE_PINSHEET,
_( "Move PinSheet" ), move_xpm ); msg, move_xpm );
}
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_EDIT_PINSHEET, _( "Edit PinSheet" ), ADD_MENUITEM( PopMenu, ID_POPUP_SCH_EDIT_PINSHEET, _( "Edit PinSheet" ),
edit_xpm ); edit_xpm );
......
...@@ -37,6 +37,38 @@ static bool LastPinCommonConvert = false; ...@@ -37,6 +37,38 @@ static bool LastPinCommonConvert = false;
static bool LastPinCommonUnit = false; static bool LastPinCommonUnit = false;
static bool LastPinVisible = true; static bool LastPinVisible = true;
void WinEDA_LibeditFrame::OnRotatePin( wxCommandEvent& event ){
// Check, if the item is a pin, else return
if( m_drawItem == NULL || m_drawItem->Type() != COMPONENT_PIN_DRAW_TYPE )
return;
// save flags to restore them after rotating
int item_flags = m_drawItem->m_Flags;
LIB_PIN* pin = (LIB_PIN*) m_drawItem;
// Save old pin orientation
LastPinOrient = pin -> m_Orient;
SaveCopyInUndoList( pin->GetParent() );
// Get the actual pin orientation index
int orientationIndex = pin -> GetOrientationCodeIndex(pin -> m_Orient);
// Compute the next orientation, swap lower two bits for the right order
orientationIndex = ((orientationIndex & 2) >> 1) | ((orientationIndex & 1) << 1);
orientationIndex = orientationIndex + 1;
orientationIndex = ((orientationIndex & 2) >> 1) | ((orientationIndex & 1) << 1);
// Set the new orientation
pin->SetOrientation(pin->GetOrientationCode(orientationIndex));
GetScreen()->SetModify();
pin->DisplayInfo( this );
DrawPanel->Refresh();
// Restore pin flags
pin->m_Flags = item_flags;
}
void WinEDA_LibeditFrame::OnEditPin( wxCommandEvent& event ) void WinEDA_LibeditFrame::OnEditPin( wxCommandEvent& event )
{ {
......
...@@ -115,8 +115,8 @@ set(PCBNEW_SRCS ...@@ -115,8 +115,8 @@ set(PCBNEW_SRCS
loadcmp.cpp loadcmp.cpp
locate.cpp locate.cpp
magnetic_tracks_functions.cpp magnetic_tracks_functions.cpp
menubarmodedit.cpp menubar_modedit.cpp
menubarpcb.cpp menubar_pcbframe.cpp
mirepcb.cpp mirepcb.cpp
modedit.cpp modedit.cpp
modedit_onclick.cpp modedit_onclick.cpp
......
...@@ -14,24 +14,10 @@ ...@@ -14,24 +14,10 @@
#include "pcbnew_id.h" #include "pcbnew_id.h"
#include "dialog_display_options.h"
#include "dialog_display_options_base.h" #include "dialog_display_options_base.h"
class Dialog_Display_Options : public DialogDisplayOptions_base
{
private:
WinEDA_BasePcbFrame* m_Parent;
void init();
public:
Dialog_Display_Options( WinEDA_BasePcbFrame* parent );
~Dialog_Display_Options( ) { };
void OnOkClick( wxCommandEvent& event );
void OnCancelClick( wxCommandEvent& event );
};
void WinEDA_PcbFrame::InstallDisplayOptionsDialog( wxCommandEvent& aEvent ) void WinEDA_PcbFrame::InstallDisplayOptionsDialog( wxCommandEvent& aEvent )
{ {
Dialog_Display_Options* DisplayOptionsDialog = Dialog_Display_Options* DisplayOptionsDialog =
......
/**
* @file dialog_display_options.h
*/
#include "dialog_display_options_base.h"
class Dialog_Display_Options : public DialogDisplayOptions_base
{
private:
WinEDA_BasePcbFrame* m_Parent;
void init();
public:
Dialog_Display_Options( WinEDA_BasePcbFrame* parent );
Dialog_Display_Options(WinEDA_BasePcbFrame*, wxWindow*);
~Dialog_Display_Options( ) { };
void OnOkClick( wxCommandEvent& event );
void OnCancelClick( wxCommandEvent& event );
};
/***************/ /**
/* hotkeys.h */ * @file hotkeys.h
/***************/ * PCBNew hotkeys
#ifndef KOTKEYS_H */
#define KOTKEYS_H #ifndef _PCBNEW_KOTKEYS_H
#define _PCBNEW_HOTKEYS_H
#include "hotkeys_basic.h" #include "hotkeys_basic.h"
...@@ -63,4 +64,4 @@ extern struct Ki_HotkeyInfoSectionDescriptor s_Board_Editor_Hokeys_Descr[]; ...@@ -63,4 +64,4 @@ extern struct Ki_HotkeyInfoSectionDescriptor s_Board_Editor_Hokeys_Descr[];
// List of hotkey descriptors for the footprint editor only // List of hotkey descriptors for the footprint editor only
extern struct Ki_HotkeyInfoSectionDescriptor s_Module_Editor_Hokeys_Descr[]; extern struct Ki_HotkeyInfoSectionDescriptor s_Module_Editor_Hokeys_Descr[];
#endif // KOTKEYS_H #endif /* _PCBNEW_HOTKEYS_H_ */
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