Dialog page setting: replace wxStaticBoxSizer by wxBoxSizer + static text,

because under Linux and wxWidgets 2.9, wxStaticBoxSizer are very ugly (text not readable in this dialog)
(Does not happen with wxWidgets 2.8)
Eeschema hotkeys: remove duplicate keys in key editor.
This commit is contained in:
jean-pierre charras 2013-05-28 11:49:53 +02:00
parent 2043001b0a
commit 4e94d8e793
5 changed files with 1879 additions and 1007 deletions

View File

@ -606,7 +606,7 @@ void DIALOG_PAGES_SETTINGS::UpdatePageLayoutExample()
double scaleH = (double) lyHeight / clamped_layout_size.y / appScale;
// Prepare DC.
wxSize example_size( lyWidth, lyHeight );
wxSize example_size( lyWidth + 1, lyHeight + 1 );
wxMemoryDC memDC;
memDC.SelectObject( *m_page_bitmap );
memDC.SetClippingRegion( wxPoint( 0, 0 ), example_size );

View File

@ -24,7 +24,10 @@ DIALOG_PAGES_SETTINGS_BASE::DIALOG_PAGES_SETTINGS_BASE( wxWindow* parent, wxWind
m_staticTextPaper = new wxStaticText( this, wxID_ANY, _("Paper"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextPaper->Wrap( -1 );
bleftSizer->Add( m_staticTextPaper, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
bleftSizer->Add( m_staticTextPaper, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bleftSizer->Add( m_staticline2, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
m_staticTextSize = new wxStaticText( this, wxID_ANY, _("Size:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextSize->Wrap( -1 );
@ -111,6 +114,9 @@ DIALOG_PAGES_SETTINGS_BASE::DIALOG_PAGES_SETTINGS_BASE( wxWindow* parent, wxWind
m_staticTexttbprm->Wrap( -1 );
bSizerRight->Add( m_staticTexttbprm, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bSizerRight->Add( m_staticline3, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* SheetInfoSizer;
SheetInfoSizer = new wxBoxSizer( wxHORIZONTAL );
@ -128,26 +134,36 @@ DIALOG_PAGES_SETTINGS_BASE::DIALOG_PAGES_SETTINGS_BASE( wxWindow* parent, wxWind
bSizerRight->Add( SheetInfoSizer, 0, 0, 5 );
wxStaticBoxSizer* DateSizer;
DateSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Issue Date") ), wxHORIZONTAL );
wxBoxSizer* bSizerDate;
bSizerDate = new wxBoxSizer( wxVERTICAL );
m_staticTextDate = new wxStaticText( this, wxID_ANY, _("Issue Date"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextDate->Wrap( -1 );
bSizerDate->Add( m_staticTextDate, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizerissuedate;
bSizerissuedate = new wxBoxSizer( wxHORIZONTAL );
m_TextDate = new wxTextCtrl( this, ID_TEXTCTRL_DATE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_TextDate->SetMaxLength( 0 );
m_TextDate->SetMinSize( wxSize( 100,-1 ) );
DateSizer->Add( m_TextDate, 3, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizerissuedate->Add( m_TextDate, 3, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_ApplyDate = new wxButton( this, ID_BTN_APPLY_DATE, _("<-"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
DateSizer->Add( m_ApplyDate, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizerissuedate->Add( m_ApplyDate, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_PickDate = new wxDatePickerCtrl( this, ID_PICKER_DATE, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_DEFAULT );
DateSizer->Add( m_PickDate, 2, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizerissuedate->Add( m_PickDate, 2, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_DateExport = new wxCheckBox( this, ID_CHECKBOX_DATE, _("Export to other sheets"), wxDefaultPosition, wxDefaultSize, 0 );
DateSizer->Add( m_DateExport, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizerissuedate->Add( m_DateExport, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizerRight->Add( DateSizer, 0, wxEXPAND, 5 );
bSizerDate->Add( bSizerissuedate, 1, wxEXPAND, 5 );
bSizerRight->Add( bSizerDate, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizerRev;
bSizerRev = new wxBoxSizer( wxVERTICAL );
@ -174,95 +190,155 @@ DIALOG_PAGES_SETTINGS_BASE::DIALOG_PAGES_SETTINGS_BASE( wxWindow* parent, wxWind
bSizerRight->Add( bSizerRev, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxStaticBoxSizer* TitleSizer;
TitleSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Title") ), wxHORIZONTAL );
wxBoxSizer* bSizerTitle;
bSizerTitle = new wxBoxSizer( wxVERTICAL );
m_staticTextTitle = new wxStaticText( this, wxID_ANY, _("Title"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextTitle->Wrap( -1 );
bSizerTitle->Add( m_staticTextTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizer12;
bSizer12 = new wxBoxSizer( wxHORIZONTAL );
m_TextTitle = new wxTextCtrl( this, ID_TEXTCTRL_TITLE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_TextTitle->SetMaxLength( 0 );
m_TextTitle->SetMinSize( wxSize( 360,-1 ) );
TitleSizer->Add( m_TextTitle, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizer12->Add( m_TextTitle, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_TitleExport = new wxCheckBox( this, wxID_ANY, _("Export to other sheets"), wxDefaultPosition, wxDefaultSize, 0 );
TitleSizer->Add( m_TitleExport, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizer12->Add( m_TitleExport, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizerRight->Add( TitleSizer, 0, wxEXPAND, 5 );
bSizerTitle->Add( bSizer12, 1, wxEXPAND, 5 );
wxStaticBoxSizer* CompanySizer;
CompanySizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Company") ), wxHORIZONTAL );
bSizerRight->Add( bSizerTitle, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizerCompany;
bSizerCompany = new wxBoxSizer( wxVERTICAL );
m_staticText13 = new wxStaticText( this, wxID_ANY, _("Company"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText13->Wrap( -1 );
bSizerCompany->Add( m_staticText13, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizer14;
bSizer14 = new wxBoxSizer( wxHORIZONTAL );
m_TextCompany = new wxTextCtrl( this, ID_TEXTCTRL_COMPANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_TextCompany->SetMaxLength( 0 );
m_TextCompany->SetMinSize( wxSize( 360,-1 ) );
CompanySizer->Add( m_TextCompany, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizer14->Add( m_TextCompany, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_CompanyExport = new wxCheckBox( this, ID_CHECKBOX_COMPANY, _("Export to other sheets"), wxDefaultPosition, wxDefaultSize, 0 );
CompanySizer->Add( m_CompanyExport, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizer14->Add( m_CompanyExport, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizerRight->Add( CompanySizer, 0, wxEXPAND, 5 );
bSizerCompany->Add( bSizer14, 1, wxEXPAND, 5 );
wxStaticBoxSizer* Comment1Sizer;
Comment1Sizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Comment1") ), wxHORIZONTAL );
bSizerRight->Add( bSizerCompany, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizerComment1;
bSizerComment1 = new wxBoxSizer( wxVERTICAL );
m_staticTextComment1 = new wxStaticText( this, wxID_ANY, _("Comment1"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextComment1->Wrap( -1 );
bSizerComment1->Add( m_staticTextComment1, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizercmt1;
bSizercmt1 = new wxBoxSizer( wxHORIZONTAL );
m_TextComment1 = new wxTextCtrl( this, ID_TEXTCTRL_COMMENT1, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_TextComment1->SetMaxLength( 0 );
m_TextComment1->SetMinSize( wxSize( 360,-1 ) );
Comment1Sizer->Add( m_TextComment1, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizercmt1->Add( m_TextComment1, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_Comment1Export = new wxCheckBox( this, ID_CHECKBOX_COMMENT1, _("Export to other sheets"), wxDefaultPosition, wxDefaultSize, 0 );
Comment1Sizer->Add( m_Comment1Export, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizercmt1->Add( m_Comment1Export, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizerRight->Add( Comment1Sizer, 0, wxEXPAND, 5 );
bSizerComment1->Add( bSizercmt1, 1, wxEXPAND, 5 );
wxStaticBoxSizer* Comment2Sizer;
Comment2Sizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Comment2") ), wxHORIZONTAL );
bSizerRight->Add( bSizerComment1, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizerComment2;
bSizerComment2 = new wxBoxSizer( wxVERTICAL );
m_staticTextComment2 = new wxStaticText( this, wxID_ANY, _("Comment2"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextComment2->Wrap( -1 );
bSizerComment2->Add( m_staticTextComment2, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizercmt2;
bSizercmt2 = new wxBoxSizer( wxHORIZONTAL );
m_TextComment2 = new wxTextCtrl( this, ID_TEXTCTRL_COMMENT2, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_TextComment2->SetMaxLength( 0 );
m_TextComment2->SetMinSize( wxSize( 360,-1 ) );
Comment2Sizer->Add( m_TextComment2, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizercmt2->Add( m_TextComment2, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_Comment2Export = new wxCheckBox( this, ID_CHECKBOX_COMMENT2, _("Export to other sheets"), wxDefaultPosition, wxDefaultSize, 0 );
Comment2Sizer->Add( m_Comment2Export, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizercmt2->Add( m_Comment2Export, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizerRight->Add( Comment2Sizer, 0, wxEXPAND, 5 );
bSizerComment2->Add( bSizercmt2, 1, wxEXPAND, 5 );
wxStaticBoxSizer* Comment3Sizer;
Comment3Sizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Comment3") ), wxHORIZONTAL );
bSizerRight->Add( bSizerComment2, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizerComment12;
bSizerComment12 = new wxBoxSizer( wxVERTICAL );
m_staticTextComment3 = new wxStaticText( this, wxID_ANY, _("Comment3"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextComment3->Wrap( -1 );
bSizerComment12->Add( m_staticTextComment3, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizercmt3;
bSizercmt3 = new wxBoxSizer( wxHORIZONTAL );
m_TextComment3 = new wxTextCtrl( this, ID_TEXTCTRL_COMMENT3, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_TextComment3->SetMaxLength( 0 );
m_TextComment3->SetMinSize( wxSize( 360,-1 ) );
Comment3Sizer->Add( m_TextComment3, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizercmt3->Add( m_TextComment3, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_Comment3Export = new wxCheckBox( this, ID_CHECKBOX_COMMENT3, _("Export to other sheets"), wxDefaultPosition, wxDefaultSize, 0 );
Comment3Sizer->Add( m_Comment3Export, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizercmt3->Add( m_Comment3Export, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizerRight->Add( Comment3Sizer, 0, wxEXPAND, 5 );
bSizerComment12->Add( bSizercmt3, 1, wxEXPAND, 5 );
wxStaticBoxSizer* Comment4Sizer;
Comment4Sizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Comment4") ), wxHORIZONTAL );
bSizerRight->Add( bSizerComment12, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizerComment4;
bSizerComment4 = new wxBoxSizer( wxVERTICAL );
m_staticTextComment4 = new wxStaticText( this, wxID_ANY, _("Comment4"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextComment4->Wrap( -1 );
bSizerComment4->Add( m_staticTextComment4, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizercmt4;
bSizercmt4 = new wxBoxSizer( wxHORIZONTAL );
m_TextComment4 = new wxTextCtrl( this, ID_TEXTCTRL_COMMENT4, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_TextComment4->SetMaxLength( 0 );
m_TextComment4->SetMinSize( wxSize( 360,-1 ) );
Comment4Sizer->Add( m_TextComment4, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizercmt4->Add( m_TextComment4, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_Comment4Export = new wxCheckBox( this, ID_CHECKBOX_COMMENT4, _("Export to other sheets"), wxDefaultPosition, wxDefaultSize, 0 );
Comment4Sizer->Add( m_Comment4Export, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizercmt4->Add( m_Comment4Export, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizerRight->Add( Comment4Sizer, 0, wxEXPAND, 5 );
bSizerComment4->Add( bSizercmt4, 1, wxEXPAND, 5 );
bSizerRight->Add( bSizerComment4, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
bUpperSizerH->Add( bSizerRight, 1, wxEXPAND, 5 );

File diff suppressed because it is too large Load Diff

View File

@ -20,6 +20,7 @@ class DIALOG_SHIM;
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/statline.h>
#include <wx/choice.h>
#include <wx/textctrl.h>
#include <wx/sizer.h>
@ -28,12 +29,10 @@ class DIALOG_SHIM;
#include <wx/image.h>
#include <wx/icon.h>
#include <wx/statbmp.h>
#include <wx/statline.h>
#include <wx/button.h>
#include <wx/datectrl.h>
#include <wx/dateevt.h>
#include <wx/checkbox.h>
#include <wx/statbox.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
@ -69,6 +68,7 @@ class DIALOG_PAGES_SETTINGS_BASE : public DIALOG_SHIM
protected:
wxStaticText* m_staticTextPaper;
wxStaticLine* m_staticline2;
wxStaticText* m_staticTextSize;
wxChoice* m_paperSizeComboBox;
wxStaticText* m_staticTextOrient;
@ -82,8 +82,10 @@ class DIALOG_PAGES_SETTINGS_BASE : public DIALOG_SHIM
wxStaticBitmap* m_PageLayoutExampleBitmap;
wxStaticLine* m_staticline1;
wxStaticText* m_staticTexttbprm;
wxStaticLine* m_staticline3;
wxStaticText* m_TextSheetCount;
wxStaticText* m_TextSheetNumber;
wxStaticText* m_staticTextDate;
wxTextCtrl* m_TextDate;
wxButton* m_ApplyDate;
wxDatePickerCtrl* m_PickDate;
@ -91,16 +93,22 @@ class DIALOG_PAGES_SETTINGS_BASE : public DIALOG_SHIM
wxStaticText* m_staticTextRev;
wxTextCtrl* m_TextRevision;
wxCheckBox* m_RevisionExport;
wxStaticText* m_staticTextTitle;
wxTextCtrl* m_TextTitle;
wxCheckBox* m_TitleExport;
wxStaticText* m_staticText13;
wxTextCtrl* m_TextCompany;
wxCheckBox* m_CompanyExport;
wxStaticText* m_staticTextComment1;
wxTextCtrl* m_TextComment1;
wxCheckBox* m_Comment1Export;
wxStaticText* m_staticTextComment2;
wxTextCtrl* m_TextComment2;
wxCheckBox* m_Comment2Export;
wxStaticText* m_staticTextComment3;
wxTextCtrl* m_TextComment3;
wxCheckBox* m_Comment3Export;
wxStaticText* m_staticTextComment4;
wxTextCtrl* m_TextComment4;
wxCheckBox* m_Comment4Export;
wxStdDialogButtonSizer* m_sdbSizer1;
@ -129,7 +137,7 @@ class DIALOG_PAGES_SETTINGS_BASE : public DIALOG_SHIM
public:
DIALOG_PAGES_SETTINGS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Page Settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 748,495 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
DIALOG_PAGES_SETTINGS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Page Settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 748,464 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_PAGES_SETTINGS_BASE();
};

View File

@ -164,7 +164,7 @@ static EDA_HOTKEY HkMirrorX( wxT( "Mirror X Component" ), HK_MIRROR_X_COMPONENT,
static EDA_HOTKEY HkOrientNormalComponent( wxT( "Orient Normal Component" ),
HK_ORIENT_NORMAL_COMPONENT, 'N', ID_SCH_ORIENT_NORMAL );
static EDA_HOTKEY HkRotate( wxT( "Rotate Item" ), HK_ROTATE, 'R', ID_SCH_ROTATE_CLOCKWISE );
static EDA_HOTKEY HkEdit( wxT( "Edit Schematic Item" ), HK_EDIT, 'E', ID_SCH_EDIT_ITEM );
static EDA_HOTKEY HkEdit( wxT( "Edit Item" ), HK_EDIT, 'E', ID_SCH_EDIT_ITEM );
static EDA_HOTKEY HkEditComponentValue( wxT( "Edit Component Value" ),
HK_EDIT_COMPONENT_VALUE, 'V',
ID_SCH_EDIT_COMPONENT_VALUE );
@ -182,7 +182,7 @@ static EDA_HOTKEY HkCopyComponentOrText( wxT( "Copy Component or Label" ),
HK_COPY_COMPONENT_OR_LABEL, 'C',
ID_POPUP_SCH_COPY_ITEM );
static EDA_HOTKEY HkDrag( wxT( "Drag Schematic Item" ), HK_DRAG, 'G', ID_SCH_DRAG_ITEM );
static EDA_HOTKEY HkDrag( wxT( "Drag Item" ), HK_DRAG, 'G', ID_SCH_DRAG_ITEM );
static EDA_HOTKEY HkSaveBlock( wxT( "Save Block" ), HK_SAVE_BLOCK, 'C' + GR_KB_CTRL );
static EDA_HOTKEY HkMove2Drag( wxT( "Move Block -> Drag Block" ),
HK_MOVEBLOCK_TO_DRAGBLOCK, '\t' );
@ -215,6 +215,10 @@ EDA_HOTKEY* s_Common_Hotkey_List[] =
&HkZoomCenter,
&HkZoomAuto,
&HkResetLocalCoord,
&HkEdit,
&HkDelete,
&HkRotate,
&HkDrag,
&HkUndo,
&HkRedo,
NULL
@ -228,20 +232,16 @@ EDA_HOTKEY* s_Schematic_Hotkey_List[] =
&HkFindItem,
&HkFindNextItem,
&HkFindNextDrcMarker,
&HkDelete,
&HkInsert,
&HkMove2Drag,
&HkSaveBlock,
&HkMove,
&HkCopyComponentOrText,
&HkDrag,
&HkAddComponent,
&HkAddPower,
&HkRotate,
&HkMirrorX,
&HkMirrorY,
&HkOrientNormalComponent,
&HkEdit,
&HkEditComponentValue,
&HkEditComponentReference,
&HkEditComponentFootprint,
@ -267,11 +267,7 @@ EDA_HOTKEY* s_LibEdit_Hotkey_List[] =
&HkSaveLib,
&HkCreatePin,
&HkInsertPin,
&HkEdit,
&HkMoveLibItem,
&HkDelete,
&HkRotate,
&HkDrag,
NULL
};
@ -579,17 +575,10 @@ void LIB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
break;
case HK_UNDO:
if( !itemInEdit )
{
cmd.SetId( wxID_UNDO );
GetEventHandler()->ProcessEvent( cmd );
}
break;
case HK_REDO:
if( !itemInEdit )
{
cmd.SetId( wxID_REDO );
cmd.SetId( hotKey->m_IdMenuEvent );
GetEventHandler()->ProcessEvent( cmd );
}
break;