New menu structure for ModEdit.
Includes some dialog changes to go with the menu update. Includes promoting the Pcbnew graphics mode back to main menu. Includes renaming Graphics modes to Toolsets.
This commit is contained in:
parent
01ab8b0584
commit
4d5e1489fb
|
@ -72,7 +72,7 @@ GAL_OPTIONS_PANEL::GAL_OPTIONS_PANEL( wxWindow* aParent, KIGFX::GAL_DISPLAY_OPTI
|
||||||
m_mainSizer->Add( sLeftSizer, 1, wxALL | wxEXPAND, 0 );
|
m_mainSizer->Add( sLeftSizer, 1, wxALL | wxEXPAND, 0 );
|
||||||
|
|
||||||
// @todo LEGACY: not required when legacy is gone
|
// @todo LEGACY: not required when legacy is gone
|
||||||
const wxString galOnlySuffix = _( " (not supported in Legacy graphics)" );
|
const wxString galOnlySuffix = _( " (not supported in Legacy Toolset)" );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Anti-aliasing subpanel
|
* Anti-aliasing subpanel
|
||||||
|
|
|
@ -196,7 +196,7 @@ void DISPLAY_FOOTPRINTS_FRAME::ReCreateOptToolbar()
|
||||||
#else
|
#else
|
||||||
m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString,
|
m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString,
|
||||||
KiBitmap( cursor_shape_xpm ),
|
KiBitmap( cursor_shape_xpm ),
|
||||||
_( "Change cursor shape (not supported in Legacy graphics)" ),
|
_( "Change cursor shape (not supported in Legacy Toolset)" ),
|
||||||
wxITEM_CHECK );
|
wxITEM_CHECK );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -244,7 +244,7 @@ void LIB_EDIT_FRAME::ReCreateOptToolbar()
|
||||||
#else
|
#else
|
||||||
m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString,
|
m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString,
|
||||||
KiScaledBitmap( cursor_shape_xpm, this ),
|
KiScaledBitmap( cursor_shape_xpm, this ),
|
||||||
_( "Change cursor shape (not supported in Legacy graphics)" ),
|
_( "Change cursor shape (not supported in Legacy Toolset)" ),
|
||||||
wxITEM_CHECK );
|
wxITEM_CHECK );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -302,7 +302,7 @@ void SCH_EDIT_FRAME::ReCreateOptToolbar()
|
||||||
#else
|
#else
|
||||||
m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString,
|
m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString,
|
||||||
KiScaledBitmap( cursor_shape_xpm, this ),
|
KiScaledBitmap( cursor_shape_xpm, this ),
|
||||||
_( "Change cursor shape (not supported in Legacy graphics)" ),
|
_( "Change cursor shape (not supported in Legacy Toolset)" ),
|
||||||
wxITEM_CHECK );
|
wxITEM_CHECK );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -219,8 +219,8 @@ GERBVIEW_FRAME::GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent ):
|
||||||
"and faster experience. This option is turned off by "
|
"and faster experience. This option is turned off by "
|
||||||
"default since it is not compatible with all computers.\n\n"
|
"default since it is not compatible with all computers.\n\n"
|
||||||
"Would you like to try enabling graphics acceleration?\n\n"
|
"Would you like to try enabling graphics acceleration?\n\n"
|
||||||
"If you'd like to choose later, select the Modern "
|
"If you'd like to choose later, select Modern Toolset "
|
||||||
"(Accelerated) graphics mode in the View menu." );
|
"(Accelerated) in the Preferences menu." );
|
||||||
|
|
||||||
wxMessageDialog dlg( this, msg, _( "Enable Graphics Acceleration" ),
|
wxMessageDialog dlg( this, msg, _( "Enable Graphics Acceleration" ),
|
||||||
wxYES_NO );
|
wxYES_NO );
|
||||||
|
|
|
@ -86,19 +86,19 @@ static EDA_HOTKEY HkSwitch2NextCopperLayer( _HKI( "Switch to Next Layer" ),
|
||||||
static EDA_HOTKEY HkSwitch2PreviousCopperLayer( _HKI( "Switch to Previous Layer" ),
|
static EDA_HOTKEY HkSwitch2PreviousCopperLayer( _HKI( "Switch to Previous Layer" ),
|
||||||
HK_SWITCH_LAYER_TO_PREVIOUS, '-' );
|
HK_SWITCH_LAYER_TO_PREVIOUS, '-' );
|
||||||
|
|
||||||
static EDA_HOTKEY HkCanvasDefault( _HKI( "Switch to Legacy Canvas" ),
|
static EDA_HOTKEY HkCanvasDefault( _HKI( "Switch to Legacy Toolset" ),
|
||||||
HK_CANVAS_LEGACY,
|
HK_CANVAS_LEGACY,
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
GR_KB_ALT +
|
GR_KB_ALT +
|
||||||
#endif
|
#endif
|
||||||
WXK_F9 );
|
WXK_F9 );
|
||||||
static EDA_HOTKEY HkCanvasOpenGL( _HKI( "Switch to Modern Canvas (hardware accelerated)" ),
|
static EDA_HOTKEY HkCanvasOpenGL( _HKI( "Switch to Modern Toolset with hardware-accelerated graphics (recommended)" ),
|
||||||
HK_CANVAS_OPENGL,
|
HK_CANVAS_OPENGL,
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
GR_KB_ALT +
|
GR_KB_ALT +
|
||||||
#endif
|
#endif
|
||||||
WXK_F11 );
|
WXK_F11 );
|
||||||
static EDA_HOTKEY HkCanvasCairo( _HKI( "Switch to Modern Canvas (software renderer)" ),
|
static EDA_HOTKEY HkCanvasCairo( _HKI( "Switch to Modern Toolset with software graphics (fall-back)" ),
|
||||||
HK_CANVAS_CAIRO,
|
HK_CANVAS_CAIRO,
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
GR_KB_ALT +
|
GR_KB_ALT +
|
||||||
|
|
|
@ -211,29 +211,23 @@ void GERBVIEW_FRAME::ReCreateMenuBar()
|
||||||
// Canvas selection
|
// Canvas selection
|
||||||
configMenu->AppendSeparator();
|
configMenu->AppendSeparator();
|
||||||
|
|
||||||
text = AddHotkeyName( _( "Legacy Graphic&s" ), GerbviewHokeysDescr,
|
text = AddHotkeyName( _( "Legacy Tool&set" ), GerbviewHokeysDescr,
|
||||||
HK_CANVAS_LEGACY );
|
HK_CANVAS_LEGACY );
|
||||||
|
AddMenuItem( configMenu, ID_MENU_CANVAS_LEGACY,
|
||||||
|
text, _( "Use Legacy Toolset (not all features will be available)" ),
|
||||||
|
KiBitmap( tools_xpm ), wxITEM_RADIO );
|
||||||
|
|
||||||
configMenu->Append(
|
text = AddHotkeyName( _( "Modern Toolset (&Accelerated)" ), GerbviewHokeysDescr,
|
||||||
new wxMenuItem( configMenu, ID_MENU_CANVAS_LEGACY,
|
|
||||||
text, _( "Use legacy graphics mode (not all features will be available)" ),
|
|
||||||
wxITEM_RADIO ) );
|
|
||||||
|
|
||||||
text = AddHotkeyName( _( "Modern (&Accelerated)" ), GerbviewHokeysDescr,
|
|
||||||
HK_CANVAS_OPENGL );
|
HK_CANVAS_OPENGL );
|
||||||
|
AddMenuItem( configMenu, ID_MENU_CANVAS_OPENGL, text,
|
||||||
|
_( "Use Modern Toolset with hardware-accelerated graphics (recommended)" ),
|
||||||
|
KiBitmap( tools_xpm ), wxITEM_RADIO );
|
||||||
|
|
||||||
configMenu->Append(
|
text = AddHotkeyName( _( "Modern Toolset (Fallba&ck)" ), GerbviewHokeysDescr,
|
||||||
new wxMenuItem( configMenu, ID_MENU_CANVAS_OPENGL,
|
|
||||||
text, _( "Use modern hardware-accelerated (OpenGL) graphics mode (recommended)" ),
|
|
||||||
wxITEM_RADIO ) );
|
|
||||||
|
|
||||||
text = AddHotkeyName( _( "Modern (Fallba&ck)" ), GerbviewHokeysDescr,
|
|
||||||
HK_CANVAS_CAIRO );
|
HK_CANVAS_CAIRO );
|
||||||
|
AddMenuItem( configMenu, ID_MENU_CANVAS_CAIRO, text,
|
||||||
configMenu->Append(
|
_( "Use Modern Toolset with software graphics (fall-back)" ),
|
||||||
new wxMenuItem( configMenu, ID_MENU_CANVAS_CAIRO,
|
KiBitmap( tools_xpm ), wxITEM_RADIO );
|
||||||
text, _( "Use modern fallback (Cairo) graphics mode" ),
|
|
||||||
wxITEM_RADIO ) );
|
|
||||||
|
|
||||||
// Menu miscellaneous
|
// Menu miscellaneous
|
||||||
wxMenu* miscellaneousMenu = new wxMenu;
|
wxMenu* miscellaneousMenu = new wxMenu;
|
||||||
|
|
|
@ -242,7 +242,7 @@ void GERBVIEW_FRAME::ReCreateOptToolbar( void )
|
||||||
#else
|
#else
|
||||||
m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString,
|
m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString,
|
||||||
KiScaledBitmap( cursor_shape_xpm, this ),
|
KiScaledBitmap( cursor_shape_xpm, this ),
|
||||||
_( "Change cursor shape (not supported in Legacy graphics)" ),
|
_( "Change cursor shape (not supported in Legacy Toolset)" ),
|
||||||
wxITEM_CHECK );
|
wxITEM_CHECK );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -42,8 +42,7 @@ bool DIALOG_MODEDIT_DISPLAY_OPTIONS::Invoke( FOOTPRINT_EDIT_FRAME& aCaller )
|
||||||
|
|
||||||
DIALOG_MODEDIT_DISPLAY_OPTIONS::DIALOG_MODEDIT_DISPLAY_OPTIONS( FOOTPRINT_EDIT_FRAME& aParent ) :
|
DIALOG_MODEDIT_DISPLAY_OPTIONS::DIALOG_MODEDIT_DISPLAY_OPTIONS( FOOTPRINT_EDIT_FRAME& aParent ) :
|
||||||
DIALOG_SHIM( &aParent, wxID_ANY, _( "Display Options" ) ),
|
DIALOG_SHIM( &aParent, wxID_ANY, _( "Display Options" ) ),
|
||||||
m_parent( aParent ),
|
m_parent( aParent )
|
||||||
m_last_scale( -1 )
|
|
||||||
{
|
{
|
||||||
auto mainSizer = new wxBoxSizer( wxVERTICAL );
|
auto mainSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
SetSizer( mainSizer );
|
SetSizer( mainSizer );
|
||||||
|
@ -54,28 +53,6 @@ DIALOG_MODEDIT_DISPLAY_OPTIONS::DIALOG_MODEDIT_DISPLAY_OPTIONS( FOOTPRINT_EDIT_F
|
||||||
m_galOptsPanel = new GAL_OPTIONS_PANEL( this, galOptions );
|
m_galOptsPanel = new GAL_OPTIONS_PANEL( this, galOptions );
|
||||||
mainSizer->Add( m_galOptsPanel, 1, wxEXPAND, 0 );
|
mainSizer->Add( m_galOptsPanel, 1, wxEXPAND, 0 );
|
||||||
|
|
||||||
auto fgsizer = new wxFlexGridSizer( 3 );
|
|
||||||
fgsizer->AddGrowableCol( 1 );
|
|
||||||
fgsizer->SetFlexibleDirection( wxBOTH );
|
|
||||||
fgsizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
|
||||||
fgsizer->Add(
|
|
||||||
new wxStaticText( this, wxID_ANY, _( "Icon scale:" ) ),
|
|
||||||
0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 3 );
|
|
||||||
m_scaleSlider = new STEPPED_SLIDER( this, wxID_ANY, 50, 50, 275,
|
|
||||||
wxDefaultPosition, wxDefaultSize,
|
|
||||||
wxSL_AUTOTICKS | wxSL_HORIZONTAL | wxSL_LABELS );
|
|
||||||
m_scaleSlider->SetStep( 25 );
|
|
||||||
fgsizer->Add( m_scaleSlider, 1, wxLEFT | wxRIGHT | wxEXPAND, 3 );
|
|
||||||
fgsizer->Add(
|
|
||||||
new wxStaticText( this, wxID_ANY, "%" ),
|
|
||||||
0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 3 );
|
|
||||||
fgsizer->AddSpacer( 0 );
|
|
||||||
m_scaleAuto = new wxCheckBox( this, wxID_ANY, _( "Auto" ) );
|
|
||||||
fgsizer->Add( m_scaleAuto, wxLEFT | wxRIGHT | wxEXPAND, 3 );
|
|
||||||
fgsizer->AddSpacer( 0 );
|
|
||||||
|
|
||||||
mainSizer->Add( fgsizer, 0, wxEXPAND | wxBOTTOM | wxLEFT | wxRIGHT, 5 );
|
|
||||||
|
|
||||||
auto btnSizer = new wxStdDialogButtonSizer();
|
auto btnSizer = new wxStdDialogButtonSizer();
|
||||||
mainSizer->Add( btnSizer, 0, wxEXPAND | wxBOTTOM | wxLEFT | wxRIGHT, 5 );
|
mainSizer->Add( btnSizer, 0, wxEXPAND | wxBOTTOM | wxLEFT | wxRIGHT, 5 );
|
||||||
|
|
||||||
|
@ -84,21 +61,6 @@ DIALOG_MODEDIT_DISPLAY_OPTIONS::DIALOG_MODEDIT_DISPLAY_OPTIONS( FOOTPRINT_EDIT_F
|
||||||
|
|
||||||
btnSizer->Realize();
|
btnSizer->Realize();
|
||||||
|
|
||||||
std::vector<wxEventTypeTag<wxScrollEvent>> scroll_events = {
|
|
||||||
wxEVT_SCROLL_TOP, wxEVT_SCROLL_BOTTOM, wxEVT_SCROLL_LINEUP, wxEVT_SCROLL_LINEDOWN,
|
|
||||||
wxEVT_SCROLL_PAGEUP, wxEVT_SCROLL_PAGEDOWN, wxEVT_SCROLL_THUMBTRACK,
|
|
||||||
wxEVT_SCROLL_THUMBRELEASE };
|
|
||||||
|
|
||||||
for( auto evt : scroll_events )
|
|
||||||
m_scaleSlider->Connect(
|
|
||||||
evt, wxScrollEventHandler( DIALOG_MODEDIT_DISPLAY_OPTIONS::OnScaleSlider ),
|
|
||||||
NULL, this );
|
|
||||||
|
|
||||||
m_scaleAuto->Connect(
|
|
||||||
wxEVT_COMMAND_CHECKBOX_CLICKED,
|
|
||||||
wxCommandEventHandler( DIALOG_MODEDIT_DISPLAY_OPTIONS::OnScaleAuto ),
|
|
||||||
NULL, this );
|
|
||||||
|
|
||||||
GetSizer()->SetSizeHints( this );
|
GetSizer()->SetSizeHints( this );
|
||||||
Centre();
|
Centre();
|
||||||
}
|
}
|
||||||
|
@ -108,20 +70,6 @@ bool DIALOG_MODEDIT_DISPLAY_OPTIONS::TransferDataToWindow()
|
||||||
{
|
{
|
||||||
// update GAL options
|
// update GAL options
|
||||||
m_galOptsPanel->TransferDataToWindow();
|
m_galOptsPanel->TransferDataToWindow();
|
||||||
|
|
||||||
const int scale_fourths = m_parent.GetIconScale();
|
|
||||||
|
|
||||||
if( scale_fourths <= 0 )
|
|
||||||
{
|
|
||||||
m_scaleAuto->SetValue( true );
|
|
||||||
m_scaleSlider->SetValue( 25 * KiIconScale( &m_parent ) );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_scaleAuto->SetValue( false );
|
|
||||||
m_scaleSlider->SetValue( scale_fourths * 25 );
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,11 +79,6 @@ bool DIALOG_MODEDIT_DISPLAY_OPTIONS::TransferDataFromWindow()
|
||||||
// update GAL options
|
// update GAL options
|
||||||
m_galOptsPanel->TransferDataFromWindow();
|
m_galOptsPanel->TransferDataFromWindow();
|
||||||
|
|
||||||
const int scale_fourths = m_scaleAuto->GetValue() ? -1 : m_scaleSlider->GetValue() / 25;
|
|
||||||
|
|
||||||
if( m_parent.GetIconScale() != scale_fourths )
|
|
||||||
m_parent.SetIconScale( scale_fourths );
|
|
||||||
|
|
||||||
// refresh view
|
// refresh view
|
||||||
KIGFX::VIEW* view = m_parent.GetGalCanvas()->GetView();
|
KIGFX::VIEW* view = m_parent.GetGalCanvas()->GetView();
|
||||||
view->RecacheAllItems();
|
view->RecacheAllItems();
|
||||||
|
@ -144,25 +87,3 @@ bool DIALOG_MODEDIT_DISPLAY_OPTIONS::TransferDataFromWindow()
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_MODEDIT_DISPLAY_OPTIONS::OnScaleSlider( wxScrollEvent& aEvent )
|
|
||||||
{
|
|
||||||
m_scaleAuto->SetValue( false );
|
|
||||||
aEvent.Skip();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_MODEDIT_DISPLAY_OPTIONS::OnScaleAuto( wxCommandEvent& aEvent )
|
|
||||||
{
|
|
||||||
if( m_scaleAuto->GetValue() )
|
|
||||||
{
|
|
||||||
m_last_scale = m_scaleSlider->GetValue();
|
|
||||||
m_scaleSlider->SetValue( 25 * KiIconScale( GetParent() ) );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if( m_last_scale >= 0 )
|
|
||||||
m_scaleSlider->SetValue( m_last_scale );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -21,8 +21,6 @@
|
||||||
|
|
||||||
class GAL_OPTIONS_PANEL;
|
class GAL_OPTIONS_PANEL;
|
||||||
class FOOTPRINT_EDIT_FRAME;
|
class FOOTPRINT_EDIT_FRAME;
|
||||||
class STEPPED_SLIDER;
|
|
||||||
class wxCheckBox;
|
|
||||||
|
|
||||||
class DIALOG_MODEDIT_DISPLAY_OPTIONS : public DIALOG_SHIM
|
class DIALOG_MODEDIT_DISPLAY_OPTIONS : public DIALOG_SHIM
|
||||||
{
|
{
|
||||||
|
@ -31,10 +29,6 @@ public:
|
||||||
|
|
||||||
static bool Invoke( FOOTPRINT_EDIT_FRAME& aCaller );
|
static bool Invoke( FOOTPRINT_EDIT_FRAME& aCaller );
|
||||||
|
|
||||||
protected:
|
|
||||||
void OnScaleSlider( wxScrollEvent& aEvent );
|
|
||||||
void OnScaleAuto( wxCommandEvent& aEvent );
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
bool TransferDataToWindow() override;
|
bool TransferDataToWindow() override;
|
||||||
|
@ -44,8 +38,4 @@ private:
|
||||||
|
|
||||||
// subpanel
|
// subpanel
|
||||||
GAL_OPTIONS_PANEL* m_galOptsPanel;
|
GAL_OPTIONS_PANEL* m_galOptsPanel;
|
||||||
|
|
||||||
int m_last_scale;
|
|
||||||
wxCheckBox* m_scaleAuto;
|
|
||||||
STEPPED_SLIDER* m_scaleSlider;
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -230,6 +230,7 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||||
wxIcon icon;
|
wxIcon icon;
|
||||||
icon.CopyFromBitmap( KiBitmap( icon_modedit_xpm ) );
|
icon.CopyFromBitmap( KiBitmap( icon_modedit_xpm ) );
|
||||||
SetIcon( icon );
|
SetIcon( icon );
|
||||||
|
m_iconScale = -1;
|
||||||
|
|
||||||
// Show a title (frame title + footprint name):
|
// Show a title (frame title + footprint name):
|
||||||
updateTitle();
|
updateTitle();
|
||||||
|
@ -1028,20 +1029,19 @@ void FOOTPRINT_EDIT_FRAME::UseGalCanvas( bool aEnable )
|
||||||
|
|
||||||
int FOOTPRINT_EDIT_FRAME::GetIconScale()
|
int FOOTPRINT_EDIT_FRAME::GetIconScale()
|
||||||
{
|
{
|
||||||
int scale = 0;
|
// All environmental settings will move to app for 6.0, so just inherit from pcbnew
|
||||||
Kiface().KifaceSettings()->Read( IconScaleEntry, &scale, 0 );
|
// for now.
|
||||||
return scale;
|
if( m_iconScale == -1 )
|
||||||
|
{
|
||||||
|
bool isBoardEditorRunning = Kiway().Player( FRAME_PCB, false ) != nullptr;
|
||||||
|
PCB_BASE_FRAME* pcbFrame = static_cast<PCB_BASE_FRAME*>( Kiway().Player( FRAME_PCB, true ) );
|
||||||
|
m_iconScale = pcbFrame->GetIconScale();
|
||||||
|
|
||||||
|
if( !isBoardEditorRunning )
|
||||||
|
pcbFrame->Destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
return m_iconScale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void FOOTPRINT_EDIT_FRAME::SetIconScale( int aScale )
|
|
||||||
{
|
|
||||||
Kiface().KifaceSettings()->Write( IconScaleEntry, aScale );
|
|
||||||
ReCreateMenuBar();
|
|
||||||
ReCreateHToolbar();
|
|
||||||
ReCreateAuxiliaryToolbar();
|
|
||||||
ReCreateVToolbar();
|
|
||||||
ReCreateOptToolbar();
|
|
||||||
Layout();
|
|
||||||
SendSizeEvent();
|
|
||||||
}
|
|
||||||
|
|
|
@ -483,7 +483,6 @@ public:
|
||||||
bool OpenProjectFiles( const std::vector<wxString>& aFileSet, int aCtl = 0 ) override;
|
bool OpenProjectFiles( const std::vector<wxString>& aFileSet, int aCtl = 0 ) override;
|
||||||
|
|
||||||
int GetIconScale() override;
|
int GetIconScale() override;
|
||||||
void SetIconScale( int aScale ) override;
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
|
|
||||||
|
@ -497,6 +496,9 @@ protected:
|
||||||
/// List of footprint editor configuration parameters.
|
/// List of footprint editor configuration parameters.
|
||||||
PARAM_CFG_ARRAY m_configParams;
|
PARAM_CFG_ARRAY m_configParams;
|
||||||
|
|
||||||
|
/// Pretty much what it says on the tin.
|
||||||
|
int m_iconScale;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function UpdateTitle
|
* Function UpdateTitle
|
||||||
* updates window title according to getLibNickName().
|
* updates window title according to getLibNickName().
|
||||||
|
|
|
@ -202,7 +202,7 @@ void FOOTPRINT_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_MODEDIT_MEASUREMENT_TOOL:
|
case ID_MODEDIT_MEASUREMENT_TOOL:
|
||||||
DisplayError( this, wxT( "Unsupported tool in legacy canvas" ) );
|
DisplayError( this, wxT( "Measurement Tool not available in Legacy Toolset" ) );
|
||||||
SetNoToolSelected();
|
SetNoToolSelected();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -977,7 +977,7 @@ void FOOTPRINT_EDIT_FRAME::OnVerticalToolbar( wxCommandEvent& aEvent )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_MODEDIT_MEASUREMENT_TOOL:
|
case ID_MODEDIT_MEASUREMENT_TOOL:
|
||||||
DisplayError( this, wxT( "Unsupported tool in legacy canvas" ) );
|
DisplayError( this, wxT( "Measurement Tool not available in Legacy Toolset" ) );
|
||||||
SetNoToolSelected();
|
SetNoToolSelected();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -128,19 +128,19 @@ static EDA_HOTKEY HkSwitchHighContrastMode( _HKI( "Toggle High Contrast Mode" ),
|
||||||
static EDA_HOTKEY HkSetGridOrigin( _HKI( "Set Grid Origin" ), HK_SET_GRID_ORIGIN, 'S' );
|
static EDA_HOTKEY HkSetGridOrigin( _HKI( "Set Grid Origin" ), HK_SET_GRID_ORIGIN, 'S' );
|
||||||
static EDA_HOTKEY HkResetGridOrigin( _HKI( "Reset Grid Origin" ), HK_RESET_GRID_ORIGIN, 'Z' );
|
static EDA_HOTKEY HkResetGridOrigin( _HKI( "Reset Grid Origin" ), HK_RESET_GRID_ORIGIN, 'Z' );
|
||||||
|
|
||||||
static EDA_HOTKEY HkCanvasDefault( _HKI( "Switch to Legacy Canvas" ),
|
static EDA_HOTKEY HkCanvasDefault( _HKI( "Switch to Legacy Toolset (not all features will be available" ),
|
||||||
HK_CANVAS_LEGACY,
|
HK_CANVAS_LEGACY,
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
GR_KB_ALT +
|
GR_KB_ALT +
|
||||||
#endif
|
#endif
|
||||||
WXK_F9 );
|
WXK_F9 );
|
||||||
static EDA_HOTKEY HkCanvasOpenGL( _HKI( "Switch to Modern Canvas (hardware accelerated)" ),
|
static EDA_HOTKEY HkCanvasOpenGL( _HKI( "Switch to Modern Toolset with hardware-accelerated graphics (recommended)" ),
|
||||||
HK_CANVAS_OPENGL,
|
HK_CANVAS_OPENGL,
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
GR_KB_ALT +
|
GR_KB_ALT +
|
||||||
#endif
|
#endif
|
||||||
WXK_F11 );
|
WXK_F11 );
|
||||||
static EDA_HOTKEY HkCanvasCairo( _HKI( "Switch to Modern Canvas (software renderer)" ),
|
static EDA_HOTKEY HkCanvasCairo( _HKI( "Switch to Modern Toolset with software graphics (fall-back)" ),
|
||||||
HK_CANVAS_CAIRO,
|
HK_CANVAS_CAIRO,
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
GR_KB_ALT +
|
GR_KB_ALT +
|
||||||
|
@ -319,7 +319,7 @@ EDA_HOTKEY* board_edit_Hotkey_List[] =
|
||||||
EDA_HOTKEY* module_edit_Hotkey_List[] = {
|
EDA_HOTKEY* module_edit_Hotkey_List[] = {
|
||||||
&HkMoveItem, &HkRotateItem, &HkEditBoardItem,
|
&HkMoveItem, &HkRotateItem, &HkEditBoardItem,
|
||||||
&HkMoveItemExact, &HkDuplicateItem, &HkDuplicateItemAndIncrement,
|
&HkMoveItemExact, &HkDuplicateItem, &HkDuplicateItemAndIncrement,
|
||||||
&HkCreateArray, &HkDelete,
|
&HkCreateArray, &HkDelete, &HkSwitchHighContrastMode,
|
||||||
&HkCanvasDefault, &HkCanvasCairo, &HkCanvasOpenGL,
|
&HkCanvasDefault, &HkCanvasCairo, &HkCanvasOpenGL,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
|
@ -62,90 +62,100 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
|
||||||
wxMenu* fileMenu = new wxMenu;
|
wxMenu* fileMenu = new wxMenu;
|
||||||
|
|
||||||
// Active library selection
|
// Active library selection
|
||||||
AddMenuItem( fileMenu, ID_MODEDIT_SELECT_CURRENT_LIB, _("Set Acti&ve Library..."),
|
AddMenuItem( fileMenu, ID_MODEDIT_SELECT_CURRENT_LIB,
|
||||||
|
_("Set Acti&ve Library..."),
|
||||||
_( "Select active library" ),
|
_( "Select active library" ),
|
||||||
KiBitmap( open_library_xpm ) );
|
KiBitmap( open_library_xpm ) );
|
||||||
|
|
||||||
fileMenu->AppendSeparator();
|
fileMenu->AppendSeparator();
|
||||||
|
|
||||||
// New module
|
// New module
|
||||||
|
text = AddHotkeyName( _( "&New Footprint..." ), m_hotkeysDescrList, HK_NEW );
|
||||||
AddMenuItem( fileMenu, ID_MODEDIT_NEW_MODULE,
|
AddMenuItem( fileMenu, ID_MODEDIT_NEW_MODULE,
|
||||||
_( "&New Footprint..." ), _( "Create new footprint" ),
|
text, _( "Create new footprint" ),
|
||||||
KiBitmap( new_footprint_xpm ) );
|
KiBitmap( new_footprint_xpm ) );
|
||||||
|
|
||||||
// Open submenu
|
text = AddHotkeyName( _( "&Open Footprint..." ), m_hotkeysDescrList, HK_OPEN );
|
||||||
wxMenu* openSubmenu = new wxMenu;
|
AddMenuItem( fileMenu, ID_MODEDIT_LOAD_MODULE, text,
|
||||||
|
_( "Open a footprint from a library" ),
|
||||||
// from File
|
|
||||||
AddMenuItem( openSubmenu, ID_MODEDIT_IMPORT_PART,
|
|
||||||
_( "&Import Footprint From File..." ),
|
|
||||||
_( "Import footprint from an existing file" ),
|
|
||||||
KiBitmap( import_module_xpm ) );
|
|
||||||
|
|
||||||
// from Library
|
|
||||||
AddMenuItem( openSubmenu, ID_MODEDIT_LOAD_MODULE,
|
|
||||||
_( "Load Footprint From Active Li&brary..." ),
|
|
||||||
_( "Open footprint from active library" ),
|
|
||||||
KiBitmap( module_xpm ) );
|
KiBitmap( module_xpm ) );
|
||||||
|
|
||||||
// from current Board
|
|
||||||
AddMenuItem( openSubmenu, ID_MODEDIT_LOAD_MODULE_FROM_BOARD,
|
|
||||||
_( "Load Footprint From &Current Board..." ),
|
|
||||||
_( "Load footprint from current board" ),
|
|
||||||
KiBitmap( load_module_board_xpm ) );
|
|
||||||
|
|
||||||
/* Append openSubmenu to fileMenu */
|
|
||||||
AddMenuItem( fileMenu, openSubmenu, -1,
|
|
||||||
_( "&Load Footprint" ),
|
|
||||||
_( "Load footprint" ),
|
|
||||||
KiBitmap( load_module_lib_xpm ) );
|
|
||||||
fileMenu->AppendSeparator();
|
fileMenu->AppendSeparator();
|
||||||
|
|
||||||
// Save the currently loaded legacy library as an s-expression library.
|
|
||||||
AddMenuItem( fileMenu, ID_MODEDIT_SAVE_LIBRARY_AS,
|
|
||||||
_( "Save A&ctive Library As..." ),
|
|
||||||
_( "Save entire active library under a new name" ),
|
|
||||||
KiBitmap( copy_library_xpm ) );
|
|
||||||
|
|
||||||
// Save module
|
// Save module
|
||||||
text = AddHotkeyName( _( "&Save Footprint in Active Library" ),
|
text = AddHotkeyName( _( "&Save" ), m_hotkeysDescrList, HK_SAVE );
|
||||||
m_hotkeysDescrList, HK_SAVE );
|
|
||||||
|
|
||||||
AddMenuItem( fileMenu, ID_MODEDIT_SAVE_LIBMODULE, text,
|
AddMenuItem( fileMenu, ID_MODEDIT_SAVE_LIBMODULE, text,
|
||||||
_( "Save footprint in active library" ),
|
_( "Save footprint" ),
|
||||||
KiBitmap( save_library_xpm ) );
|
KiBitmap( save_library_xpm ) );
|
||||||
|
|
||||||
// Save module in new lib
|
fileMenu->AppendSeparator();
|
||||||
AddMenuItem( fileMenu, ID_MODEDIT_CREATE_NEW_LIB_AND_SAVE_CURRENT_PART,
|
|
||||||
_( "S&ave Footprint in New Library..." ),
|
|
||||||
_( "Create new library and save current footprint in it" ),
|
|
||||||
KiBitmap( new_library_xpm ) );
|
|
||||||
|
|
||||||
// Export module
|
|
||||||
AddMenuItem( fileMenu, ID_MODEDIT_EXPORT_PART,
|
wxMenu* importSubMenu = new wxMenu();
|
||||||
_( "&Export Footprint..." ),
|
|
||||||
_( "Save currently loaded footprint into file" ),
|
// from current Board
|
||||||
|
AddMenuItem( importSubMenu, ID_MODEDIT_LOAD_MODULE_FROM_BOARD,
|
||||||
|
_( "Footprint from &Current Board..." ),
|
||||||
|
_( "Import a footprint from the current board" ),
|
||||||
|
KiBitmap( load_module_board_xpm ) );
|
||||||
|
|
||||||
|
AddMenuItem( importSubMenu, ID_MODEDIT_IMPORT_PART,
|
||||||
|
_( "Footprint from &KiCad File..." ),
|
||||||
|
_( "Import a footprint from an existing file" ),
|
||||||
|
KiBitmap( import_module_xpm ) );
|
||||||
|
|
||||||
|
AddMenuItem( importSubMenu, ID_GEN_IMPORT_DXF_FILE,
|
||||||
|
_( "Footprint from &DXF File..." ),
|
||||||
|
_( "Import 2D Drawing DXF file to Footprint Editor on Drawings layer" ),
|
||||||
|
KiBitmap( import_xpm ) );
|
||||||
|
|
||||||
|
AddMenuItem( fileMenu, importSubMenu, -1,
|
||||||
|
_( "&Import" ),
|
||||||
|
_( "Import files" ),
|
||||||
|
KiBitmap( import_xpm ) );
|
||||||
|
|
||||||
|
|
||||||
|
wxMenu* exportSubMenu = new wxMenu();
|
||||||
|
|
||||||
|
AddMenuItem( exportSubMenu, ID_MODEDIT_SAVE_LIBRARY_AS,
|
||||||
|
_( "&Active Library..." ),
|
||||||
|
_( "Export active library" ),
|
||||||
|
KiBitmap( library_archive_xpm ) );
|
||||||
|
|
||||||
|
AddMenuItem( exportSubMenu, ID_MODEDIT_EXPORT_PART,
|
||||||
|
_( "&Footprint..." ),
|
||||||
|
_( "Export current footprint to a file" ),
|
||||||
KiBitmap( export_module_xpm ) );
|
KiBitmap( export_module_xpm ) );
|
||||||
|
|
||||||
// Import DXF File
|
AddMenuItem( fileMenu, exportSubMenu, -1,
|
||||||
AddMenuItem( fileMenu, ID_GEN_IMPORT_DXF_FILE,
|
_( "E&xport" ),
|
||||||
_( "&Import DXF File..." ),
|
_( "Export files" ),
|
||||||
_( "Import 2D Drawing DXF file to Pcbnew on Drawings layer" ),
|
KiBitmap( export_xpm ) );
|
||||||
KiBitmap( import_xpm ) );
|
|
||||||
|
|
||||||
|
|
||||||
fileMenu->AppendSeparator();
|
fileMenu->AppendSeparator();
|
||||||
|
|
||||||
// Print
|
// Print
|
||||||
AddMenuItem( fileMenu, wxID_PRINT,
|
text = AddHotkeyName( _( "&Print..." ), m_hotkeysDescrList, HK_PRINT );
|
||||||
_( "&Print..." ),
|
AddMenuItem( fileMenu, wxID_PRINT, text,
|
||||||
_( "Print current footprint" ),
|
_( "Print current footprint" ),
|
||||||
KiBitmap( plot_xpm ) );
|
KiBitmap( print_button_xpm ) );
|
||||||
|
|
||||||
// Separator
|
// Separator
|
||||||
fileMenu->AppendSeparator();
|
fileMenu->AppendSeparator();
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
AddMenuItem( fileMenu, ID_MODEDIT_EDIT_MODULE_PROPERTIES,
|
||||||
|
_( "P&roperties..." ),
|
||||||
|
_( "Edit footprint properties" ),
|
||||||
|
KiBitmap( module_options_xpm ) );
|
||||||
|
|
||||||
|
fileMenu->AppendSeparator();
|
||||||
|
|
||||||
// Close editor
|
// Close editor
|
||||||
AddMenuItem( fileMenu, wxID_EXIT,
|
AddMenuItem( fileMenu, wxID_EXIT,
|
||||||
_( "Cl&ose" ),
|
_( "&Exit" ),
|
||||||
_( "Close footprint editor" ),
|
_( "Close footprint editor" ),
|
||||||
KiBitmap( exit_xpm ) );
|
KiBitmap( exit_xpm ) );
|
||||||
|
|
||||||
|
@ -164,56 +174,44 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
|
||||||
text, _( "Redo last action" ),
|
text, _( "Redo last action" ),
|
||||||
KiBitmap( redo_xpm ) );
|
KiBitmap( redo_xpm ) );
|
||||||
|
|
||||||
// Delete items
|
|
||||||
AddMenuItem( editMenu, ID_MODEDIT_DELETE_TOOL,
|
|
||||||
_( "&Delete" ), _( "Delete objects with eraser" ),
|
|
||||||
KiBitmap( delete_xpm ) );
|
|
||||||
|
|
||||||
// Separator
|
// Separator
|
||||||
editMenu->AppendSeparator();
|
editMenu->AppendSeparator();
|
||||||
|
|
||||||
if( IsGalCanvasActive() )
|
if( IsGalCanvasActive() )
|
||||||
{
|
{
|
||||||
text = AddHotkeyName( _( "&Cut" ), g_Module_Viewer_Hotkeys_Descr, HK_EDIT_CUT );
|
text = AddHotkeyName( _( "Cu&t" ), m_hotkeysDescrList, HK_EDIT_CUT );
|
||||||
AddMenuItem( editMenu, ID_EDIT_CUT, text, _(
|
AddMenuItem( editMenu, ID_EDIT_CUT, text, _(
|
||||||
"Cuts the selected item(s) to the Clipboard" ), KiBitmap( cut_xpm ) );
|
"Cuts the selected item(s) to the Clipboard" ), KiBitmap( cut_xpm ) );
|
||||||
text = AddHotkeyName( _( "&Copy" ), g_Module_Viewer_Hotkeys_Descr, HK_EDIT_COPY );
|
text = AddHotkeyName( _( "&Copy" ), m_hotkeysDescrList, HK_EDIT_COPY );
|
||||||
AddMenuItem( editMenu, ID_EDIT_COPY, text, _(
|
AddMenuItem( editMenu, ID_EDIT_COPY, text, _(
|
||||||
"Copies the selected item(s) to the Clipboard" ), KiBitmap( copy_xpm ) );
|
"Copies the selected item(s) to the Clipboard" ), KiBitmap( copy_xpm ) );
|
||||||
text = AddHotkeyName( _( "&Paste" ), g_Module_Viewer_Hotkeys_Descr, HK_EDIT_PASTE );
|
text = AddHotkeyName( _( "&Paste" ), m_hotkeysDescrList, HK_EDIT_PASTE );
|
||||||
AddMenuItem( editMenu, ID_EDIT_PASTE, text, _(
|
AddMenuItem( editMenu, ID_EDIT_PASTE, text, _(
|
||||||
"Pastes item(s) from the Clipboard" ), KiBitmap( paste_xpm ) );
|
"Pastes item(s) from the Clipboard" ), KiBitmap( paste_xpm ) );
|
||||||
editMenu->AppendSeparator();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Properties
|
// Delete items
|
||||||
AddMenuItem( editMenu, ID_MODEDIT_EDIT_MODULE_PROPERTIES,
|
AddMenuItem( editMenu, ID_MODEDIT_DELETE_TOOL,
|
||||||
_( "Footprint &Properties..." ),
|
_( "&Delete" ), _( "Delete items" ),
|
||||||
_( "Edit footprint properties" ),
|
KiBitmap( delete_xpm ) );
|
||||||
KiBitmap( module_options_xpm ) );
|
|
||||||
|
|
||||||
// Dimensions submenu
|
editMenu->AppendSeparator();
|
||||||
wxMenu* dimensions_Submenu = new wxMenu;
|
|
||||||
|
|
||||||
// User grid size
|
|
||||||
AddMenuItem( dimensions_Submenu, ID_PCB_USER_GRID_SETUP,
|
|
||||||
_( "Set Custom &User Grid..." ), _( "Set custom user grid size" ),
|
|
||||||
KiBitmap( grid_xpm ) );
|
|
||||||
|
|
||||||
// Sizes and Widths
|
|
||||||
AddMenuItem( dimensions_Submenu, ID_PCB_DRAWINGS_WIDTHS_SETUP,
|
|
||||||
_( "Text &Size and Width..." ),
|
|
||||||
_( "Adjust width for text and drawing" ),
|
|
||||||
KiBitmap( text_xpm ) );
|
|
||||||
|
|
||||||
// Pad settings
|
|
||||||
AddMenuItem( dimensions_Submenu, ID_MODEDIT_PAD_SETTINGS,
|
|
||||||
_( "Default &Pad Properties..." ), _( "Edit settings for new pads" ),
|
|
||||||
KiBitmap( pad_dimensions_xpm ) );
|
|
||||||
|
|
||||||
//--------- View menu ----------------
|
//--------- View menu ----------------
|
||||||
wxMenu* viewMenu = new wxMenu;
|
wxMenu* viewMenu = new wxMenu;
|
||||||
|
|
||||||
|
AddMenuItem( viewMenu, ID_OPEN_MODULE_VIEWER,
|
||||||
|
_( "&Library Browser" ),
|
||||||
|
_( "Open the Library Browser" ),
|
||||||
|
KiBitmap( modview_icon_xpm ) );
|
||||||
|
|
||||||
|
text = AddHotkeyName( _( "&3D Viewer" ), m_hotkeysDescrList, HK_3D_VIEWER );
|
||||||
|
AddMenuItem( viewMenu, ID_MENU_PCB_SHOW_3D_FRAME,
|
||||||
|
text, _( "Show footprint in 3D viewer" ),
|
||||||
|
KiBitmap( three_d_xpm ) );
|
||||||
|
|
||||||
|
viewMenu->AppendSeparator();
|
||||||
|
|
||||||
/* Important Note for ZOOM IN and ZOOM OUT commands from menubar:
|
/* Important Note for ZOOM IN and ZOOM OUT commands from menubar:
|
||||||
* we cannot add hotkey info here, because the hotkey HK_ZOOM_IN and HK_ZOOM_OUT
|
* we cannot add hotkey info here, because the hotkey HK_ZOOM_IN and HK_ZOOM_OUT
|
||||||
* events(default = WXK_F1 and WXK_F2) are *NOT* equivalent to this menu command:
|
* events(default = WXK_F1 and WXK_F2) are *NOT* equivalent to this menu command:
|
||||||
|
@ -244,37 +242,92 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
|
||||||
|
|
||||||
viewMenu->AppendSeparator();
|
viewMenu->AppendSeparator();
|
||||||
|
|
||||||
// 3D view
|
AddMenuItem( viewMenu, ID_TB_OPTIONS_SHOW_GRID,
|
||||||
text = AddHotkeyName( _( "&3D Viewer" ), m_hotkeysDescrList, HK_3D_VIEWER );
|
_( "Show &Grid" ), wxEmptyString,
|
||||||
AddMenuItem( viewMenu, ID_MENU_PCB_SHOW_3D_FRAME, text, _( "Show footprint in 3D viewer" ),
|
KiBitmap( grid_xpm ), wxITEM_CHECK );
|
||||||
KiBitmap( three_d_xpm ) );
|
|
||||||
|
AddMenuItem( viewMenu, ID_PCB_USER_GRID_SETUP,
|
||||||
|
_( "Grid &Settings..." ),_( "Adjust custom user-defined grid dimensions" ),
|
||||||
|
KiBitmap( grid_xpm ) );
|
||||||
|
|
||||||
|
AddMenuItem( viewMenu, ID_TB_OPTIONS_SHOW_POLAR_COORD,
|
||||||
|
_( "Display &Polar Coordinates" ), wxEmptyString,
|
||||||
|
KiBitmap( polar_coord_xpm ), wxITEM_CHECK );
|
||||||
|
|
||||||
|
// Units submenu
|
||||||
|
wxMenu* unitsSubMenu = new wxMenu;
|
||||||
|
AddMenuItem( unitsSubMenu, ID_TB_OPTIONS_SELECT_UNIT_INCH,
|
||||||
|
_( "&Imperial" ), _( "Use imperial units" ),
|
||||||
|
KiBitmap( unit_inch_xpm ), wxITEM_RADIO );
|
||||||
|
|
||||||
|
AddMenuItem( unitsSubMenu, ID_TB_OPTIONS_SELECT_UNIT_MM,
|
||||||
|
_( "&Metric" ), _( "Use metric units" ),
|
||||||
|
KiBitmap( unit_mm_xpm ), wxITEM_RADIO );
|
||||||
|
|
||||||
|
AddMenuItem( viewMenu, unitsSubMenu,
|
||||||
|
-1, _( "&Units" ),
|
||||||
|
_( "Select which units are displayed" ),
|
||||||
|
KiBitmap( unit_mm_xpm ) );
|
||||||
|
|
||||||
|
#ifndef __APPLE__
|
||||||
|
AddMenuItem( viewMenu, ID_TB_OPTIONS_SELECT_CURSOR,
|
||||||
|
_( "Full Window Crosshair" ),
|
||||||
|
_( "Change cursor shape" ),
|
||||||
|
KiBitmap( cursor_shape_xpm ), wxITEM_CHECK );
|
||||||
|
#else
|
||||||
|
AddMenuItem( viewMenu, ID_TB_OPTIONS_SELECT_CURSOR,
|
||||||
|
_( "Full Window Crosshair" ),
|
||||||
|
_( "Change cursor shape (not supported in Legacy Toolset)" ),
|
||||||
|
KiBitmap( cursor_shape_xpm ), wxITEM_CHECK );
|
||||||
|
#endif
|
||||||
|
|
||||||
// Add canvas selection
|
|
||||||
viewMenu->AppendSeparator();
|
viewMenu->AppendSeparator();
|
||||||
|
|
||||||
text = AddHotkeyName( _( "Legacy Graphic&s" ), m_hotkeysDescrList,
|
// Drawing Mode Submenu
|
||||||
HK_CANVAS_LEGACY );
|
wxMenu* drawingModeSubMenu = new wxMenu;
|
||||||
|
|
||||||
viewMenu->Append(
|
AddMenuItem( drawingModeSubMenu, ID_TB_OPTIONS_SHOW_PADS_SKETCH,
|
||||||
new wxMenuItem( viewMenu, ID_MENU_CANVAS_LEGACY,
|
_( "Sketch &Pads" ), _( "Show pads in outline mode" ),
|
||||||
text, _( "Use legacy graphics mode (not all features will be available)" ),
|
KiBitmap( pad_sketch_xpm ), wxITEM_CHECK );
|
||||||
wxITEM_RADIO ) );
|
|
||||||
|
|
||||||
text = AddHotkeyName( _( "Modern (&Accelerated)" ), m_hotkeysDescrList,
|
AddMenuItem( drawingModeSubMenu, ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH,
|
||||||
HK_CANVAS_OPENGL );
|
_( "Sketch Footprint &Edges" ), _( "Show footprint edges in outline mode" ),
|
||||||
|
KiBitmap( show_mod_edge_xpm ), wxITEM_CHECK );
|
||||||
|
AddMenuItem( drawingModeSubMenu, ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH,
|
||||||
|
_( "Sketch Footprint Te&xt" ), _( "Show footprint text in outline mode" ),
|
||||||
|
KiBitmap( text_sketch_xpm ), wxITEM_CHECK );
|
||||||
|
|
||||||
viewMenu->Append(
|
AddMenuItem( viewMenu, drawingModeSubMenu,
|
||||||
new wxMenuItem( viewMenu, ID_MENU_CANVAS_OPENGL,
|
-1, _( "&Drawing Mode" ),
|
||||||
text, _( "Use modern hardware-accelerated (OpenGL) graphics mode (recommended)" ),
|
_( "Select how items are displayed" ),
|
||||||
wxITEM_RADIO ) );
|
KiBitmap( add_zone_xpm ) );
|
||||||
|
|
||||||
text = AddHotkeyName( _( "Modern (Fallba&ck)" ), m_hotkeysDescrList,
|
|
||||||
HK_CANVAS_CAIRO );
|
|
||||||
|
|
||||||
viewMenu->Append(
|
text = AddHotkeyName( _( "&High Contrast Mode" ), m_hotkeysDescrList,
|
||||||
new wxMenuItem( viewMenu, ID_MENU_CANVAS_CAIRO,
|
HK_SWITCH_HIGHCONTRAST_MODE );
|
||||||
text, _( "Use modern fallback (Cairo) graphics mode" ),
|
AddMenuItem( viewMenu, ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE, text,
|
||||||
wxITEM_RADIO ) );
|
_( "Use high contrast display mode" ),
|
||||||
|
KiBitmap( contrast_mode_xpm ), wxITEM_CHECK );
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
viewMenu->AppendSeparator();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
//-------- Setup menu --------------------
|
||||||
|
wxMenu* setupMenu = new wxMenu;
|
||||||
|
|
||||||
|
// Sizes and Widths
|
||||||
|
AddMenuItem( setupMenu, ID_PCB_DRAWINGS_WIDTHS_SETUP,
|
||||||
|
_( "Te&xts and Drawings..." ),
|
||||||
|
_( "Adjust dimensions for texts and drawings" ),
|
||||||
|
KiBitmap( text_xpm ) );
|
||||||
|
|
||||||
|
// Pad settings
|
||||||
|
AddMenuItem( setupMenu, ID_MODEDIT_PAD_SETTINGS,
|
||||||
|
_( "Default &Pad Properties..." ),
|
||||||
|
_( "Edit settings for new pads" ),
|
||||||
|
KiBitmap( pad_dimensions_xpm ) );
|
||||||
|
|
||||||
//-------- Place menu --------------------
|
//-------- Place menu --------------------
|
||||||
wxMenu* placeMenu = new wxMenu;
|
wxMenu* placeMenu = new wxMenu;
|
||||||
|
@ -286,26 +339,30 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
|
||||||
|
|
||||||
placeMenu->AppendSeparator();
|
placeMenu->AppendSeparator();
|
||||||
|
|
||||||
// Circle
|
// Text
|
||||||
AddMenuItem( placeMenu, ID_MODEDIT_CIRCLE_TOOL,
|
AddMenuItem( placeMenu, ID_MODEDIT_TEXT_TOOL,
|
||||||
_( "&Circle" ), _( "Add graphic circle" ),
|
_( "&Text" ), _( "Add graphic text" ),
|
||||||
KiBitmap( add_circle_xpm ) );
|
KiBitmap( text_xpm ) );
|
||||||
|
|
||||||
// Line or Polygon
|
|
||||||
AddMenuItem( placeMenu, ID_MODEDIT_LINE_TOOL,
|
|
||||||
_( "&Line or Polygon" ),
|
|
||||||
_( "Add graphic line or polygon" ),
|
|
||||||
KiBitmap( add_polygon_xpm ) );
|
|
||||||
|
|
||||||
// Arc
|
// Arc
|
||||||
AddMenuItem( placeMenu, ID_MODEDIT_ARC_TOOL,
|
AddMenuItem( placeMenu, ID_MODEDIT_ARC_TOOL,
|
||||||
_( "&Arc" ), _( "Add graphic arc" ),
|
_( "&Arc" ), _( "Add graphic arc" ),
|
||||||
KiBitmap( add_arc_xpm ) );
|
KiBitmap( add_arc_xpm ) );
|
||||||
|
|
||||||
// Text
|
// Circle
|
||||||
AddMenuItem( placeMenu, ID_MODEDIT_TEXT_TOOL,
|
AddMenuItem( placeMenu, ID_MODEDIT_CIRCLE_TOOL,
|
||||||
_( "&Text" ), _( "Add graphic text" ),
|
_( "&Circle" ), _( "Add graphic circle" ),
|
||||||
KiBitmap( text_xpm ) );
|
KiBitmap( add_circle_xpm ) );
|
||||||
|
|
||||||
|
// Line
|
||||||
|
AddMenuItem( placeMenu, ID_MODEDIT_LINE_TOOL,
|
||||||
|
_( "&Lines" ), _( "Add graphic line" ),
|
||||||
|
KiBitmap( add_graphical_segments_xpm ) );
|
||||||
|
|
||||||
|
// Polygon
|
||||||
|
AddMenuItem( placeMenu, ID_MODEDIT_POLYGON_TOOL,
|
||||||
|
_( "&Polygon" ), _( "Add graphic polygon" ),
|
||||||
|
KiBitmap( add_graphical_polygon_xpm ) );
|
||||||
|
|
||||||
placeMenu->AppendSeparator();
|
placeMenu->AppendSeparator();
|
||||||
|
|
||||||
|
@ -315,6 +372,41 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
|
||||||
_( "Place footprint reference anchor" ),
|
_( "Place footprint reference anchor" ),
|
||||||
KiBitmap( anchor_xpm ) );
|
KiBitmap( anchor_xpm ) );
|
||||||
|
|
||||||
|
// Origin
|
||||||
|
AddMenuItem( placeMenu, ID_MODEDIT_PLACE_GRID_COORD,
|
||||||
|
_( "&Grid Origin" ),
|
||||||
|
_( "Set grid origin point" ),
|
||||||
|
KiBitmap( grid_select_axis_xpm ) );
|
||||||
|
|
||||||
|
|
||||||
|
//----- Inspect menu ---------------------
|
||||||
|
wxMenu* inspectMenu = new wxMenu;
|
||||||
|
|
||||||
|
AddMenuItem( inspectMenu, ID_MODEDIT_MEASUREMENT_TOOL,
|
||||||
|
_( "&Measure" ),
|
||||||
|
_( "Measure distance" ),
|
||||||
|
KiBitmap( measurement_xpm ) );
|
||||||
|
|
||||||
|
//----- Tools menu ---------------------
|
||||||
|
wxMenu* toolsMenu = new wxMenu;
|
||||||
|
|
||||||
|
AddMenuItem( toolsMenu, ID_MODEDIT_UPDATE_MODULE_IN_BOARD,
|
||||||
|
_( "&Update Footprint on PCB" ),
|
||||||
|
_( "Push updated footprint through to current board" ),
|
||||||
|
KiBitmap( update_module_board_xpm ) );
|
||||||
|
|
||||||
|
AddMenuItem( toolsMenu, ID_MODEDIT_INSERT_MODULE_IN_BOARD,
|
||||||
|
_( "&Insert Footprint on PCB" ),
|
||||||
|
_( "Insert footprint onto current board" ),
|
||||||
|
KiBitmap( insert_module_board_xpm ) );
|
||||||
|
|
||||||
|
toolsMenu->AppendSeparator();
|
||||||
|
|
||||||
|
AddMenuItem( toolsMenu, ID_MODEDIT_DELETE_PART,
|
||||||
|
_( "&Delete a Footprint in Active Library" ),
|
||||||
|
_( "Choose and delete a footprint from the active library" ),
|
||||||
|
KiBitmap( delete_xpm ) );
|
||||||
|
|
||||||
|
|
||||||
//----- Preferences menu -----------------
|
//----- Preferences menu -----------------
|
||||||
wxMenu* prefs_menu = new wxMenu;
|
wxMenu* prefs_menu = new wxMenu;
|
||||||
|
@ -339,11 +431,33 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
|
||||||
_( "General &Settings..." ), _( "Change footprint editor settings." ),
|
_( "General &Settings..." ), _( "Change footprint editor settings." ),
|
||||||
KiBitmap( preference_xpm ) );
|
KiBitmap( preference_xpm ) );
|
||||||
|
|
||||||
|
prefs_menu->AppendSeparator();
|
||||||
|
|
||||||
AddMenuItem( prefs_menu, ID_PCB_DISPLAY_OPTIONS_SETUP,
|
AddMenuItem( prefs_menu, ID_PCB_DISPLAY_OPTIONS_SETUP,
|
||||||
_( "&Display Settings..." ),
|
_( "&Display Options..." ),
|
||||||
_( "Change footprint editor display settings" ),
|
_( "Graphics acceleration, grid and cursor settings." ),
|
||||||
KiBitmap( display_options_xpm ) );
|
KiBitmap( display_options_xpm ) );
|
||||||
|
|
||||||
|
text = AddHotkeyName( _( "Legacy Tool&set" ), m_hotkeysDescrList,
|
||||||
|
HK_CANVAS_LEGACY );
|
||||||
|
AddMenuItem( prefs_menu, ID_MENU_CANVAS_LEGACY, text,
|
||||||
|
_( "Use Legacy Toolset (not all features will be available)" ),
|
||||||
|
KiBitmap( tools_xpm ), wxITEM_RADIO );
|
||||||
|
|
||||||
|
text = AddHotkeyName( _( "Modern Toolset (&Accelerated)" ),
|
||||||
|
m_hotkeysDescrList, HK_CANVAS_OPENGL );
|
||||||
|
AddMenuItem( prefs_menu, ID_MENU_CANVAS_OPENGL, text,
|
||||||
|
_( "Use Modern Toolset with hardware-accelerated graphics (recommended)" ),
|
||||||
|
KiBitmap( tools_xpm ), wxITEM_RADIO );
|
||||||
|
|
||||||
|
text = AddHotkeyName( _( "Modern Toolset (&Fallback)" ),
|
||||||
|
m_hotkeysDescrList, HK_CANVAS_CAIRO );
|
||||||
|
AddMenuItem( prefs_menu, ID_MENU_CANVAS_CAIRO, text,
|
||||||
|
_( "Use Modern Toolset with software graphics (fallback)" ),
|
||||||
|
KiBitmap( tools_xpm ), wxITEM_RADIO );
|
||||||
|
|
||||||
|
prefs_menu->AppendSeparator();
|
||||||
|
|
||||||
// Language submenu
|
// Language submenu
|
||||||
Pgm().AddMenuLanguageList( prefs_menu );
|
Pgm().AddMenuLanguageList( prefs_menu );
|
||||||
|
|
||||||
|
@ -364,7 +478,7 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
|
||||||
_( "Open the \"Getting Started in KiCad\" guide for beginners" ),
|
_( "Open the \"Getting Started in KiCad\" guide for beginners" ),
|
||||||
KiBitmap( help_xpm ) );
|
KiBitmap( help_xpm ) );
|
||||||
|
|
||||||
text = AddHotkeyName( _( "&List Hotkeys..." ), g_Pcbnew_Editor_Hotkeys_Descr, HK_HELP );
|
text = AddHotkeyName( _( "&List Hotkeys..." ), m_hotkeysDescrList, HK_HELP );
|
||||||
AddMenuItem( helpMenu, ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST,
|
AddMenuItem( helpMenu, ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST,
|
||||||
text,
|
text,
|
||||||
_( "Displays current hotkeys table and corresponding commands" ),
|
_( "Displays current hotkeys table and corresponding commands" ),
|
||||||
|
@ -388,9 +502,11 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
|
||||||
menuBar->Append( fileMenu, _( "&File" ) );
|
menuBar->Append( fileMenu, _( "&File" ) );
|
||||||
menuBar->Append( editMenu, _( "&Edit" ) );
|
menuBar->Append( editMenu, _( "&Edit" ) );
|
||||||
menuBar->Append( viewMenu, _( "&View" ) );
|
menuBar->Append( viewMenu, _( "&View" ) );
|
||||||
|
menuBar->Append( setupMenu, _( "&Setup" ) );
|
||||||
menuBar->Append( placeMenu, _( "&Place" ) );
|
menuBar->Append( placeMenu, _( "&Place" ) );
|
||||||
|
menuBar->Append( inspectMenu, _( "&Inspect" ) );
|
||||||
|
menuBar->Append( toolsMenu, _( "&Tools" ) );
|
||||||
menuBar->Append( prefs_menu, _( "P&references" ) );
|
menuBar->Append( prefs_menu, _( "P&references" ) );
|
||||||
menuBar->Append( dimensions_Submenu, _( "Di&mensions" ) );
|
|
||||||
menuBar->Append( helpMenu, _( "&Help" ) );
|
menuBar->Append( helpMenu, _( "&Help" ) );
|
||||||
|
|
||||||
menuBar->Thaw();
|
menuBar->Thaw();
|
||||||
|
|
|
@ -178,7 +178,8 @@ void prepareSetupMenu( wxMenu* aParentMenu )
|
||||||
|
|
||||||
AddMenuItem( aParentMenu, ID_MENU_PCB_SHOW_DESIGN_RULES_DIALOG,
|
AddMenuItem( aParentMenu, ID_MENU_PCB_SHOW_DESIGN_RULES_DIALOG,
|
||||||
_( "&Design Rules..." ),
|
_( "&Design Rules..." ),
|
||||||
_( "Open design rules editor" ), KiBitmap( config_xpm ) );
|
_( "Open design rules editor" ),
|
||||||
|
KiBitmap( config_xpm ) );
|
||||||
|
|
||||||
aParentMenu->AppendSeparator();
|
aParentMenu->AppendSeparator();
|
||||||
|
|
||||||
|
@ -218,33 +219,29 @@ void preparePreferencesMenu( PCB_EDIT_FRAME* aFrame, wxMenu* aParentMenu )
|
||||||
KiBitmap( preference_xpm ) );
|
KiBitmap( preference_xpm ) );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
aParentMenu->AppendSeparator();
|
// Display Settings
|
||||||
|
|
||||||
AddMenuItem( aParentMenu, ID_PCB_DISPLAY_OPTIONS_SETUP,
|
AddMenuItem( aParentMenu, ID_PCB_DISPLAY_OPTIONS_SETUP,
|
||||||
_( "&Display Options..." ),
|
_( "&Display Options..." ),
|
||||||
_( "Graphics acceleration, grid, cursor, annotation and clearance outline settings." ),
|
_( "Graphics acceleration, grid, cursor, annotation and clearance outline settings." ),
|
||||||
KiBitmap( display_options_xpm ) );
|
KiBitmap( display_options_xpm ) );
|
||||||
|
|
||||||
text = AddHotkeyName( _( "&Legacy Toolset" ), g_Pcbnew_Editor_Hotkeys_Descr,
|
text = AddHotkeyName( _( "Legacy Tool&set" ), g_Pcbnew_Editor_Hotkeys_Descr,
|
||||||
HK_CANVAS_LEGACY );
|
HK_CANVAS_LEGACY );
|
||||||
aParentMenu->Append(
|
AddMenuItem( aParentMenu, ID_MENU_CANVAS_LEGACY, text,
|
||||||
new wxMenuItem( aParentMenu, ID_MENU_CANVAS_LEGACY,
|
_( "Use Legacy Toolset (not all features will be available)" ),
|
||||||
text, _( "Use legacy graphics mode (not all features will be available)" ),
|
KiBitmap( tools_xpm ), wxITEM_RADIO );
|
||||||
wxITEM_RADIO ) );
|
|
||||||
|
|
||||||
text = AddHotkeyName( _( "Modern Toolset (&Accelerated)" ), g_Pcbnew_Editor_Hotkeys_Descr,
|
text = AddHotkeyName( _( "Modern Toolset (&Accelerated)" ), g_Pcbnew_Editor_Hotkeys_Descr,
|
||||||
HK_CANVAS_OPENGL );
|
HK_CANVAS_OPENGL );
|
||||||
aParentMenu->Append(
|
AddMenuItem( aParentMenu, ID_MENU_CANVAS_OPENGL, text,
|
||||||
new wxMenuItem( aParentMenu, ID_MENU_CANVAS_OPENGL,
|
_( "Use Modern Toolset with hardware-accelerated graphics (recommended)" ),
|
||||||
text, _( "Use modern hardware-accelerated (OpenGL) graphics mode (recommended)" ),
|
KiBitmap( tools_xpm ), wxITEM_RADIO );
|
||||||
wxITEM_RADIO ) );
|
|
||||||
|
|
||||||
text = AddHotkeyName( _( "Modern Toolset (&Fallback)" ), g_Pcbnew_Editor_Hotkeys_Descr,
|
text = AddHotkeyName( _( "Modern Toolset (Fallba&ck)" ), g_Pcbnew_Editor_Hotkeys_Descr,
|
||||||
HK_CANVAS_CAIRO );
|
HK_CANVAS_CAIRO );
|
||||||
aParentMenu->Append(
|
AddMenuItem( aParentMenu, ID_MENU_CANVAS_CAIRO, text,
|
||||||
new wxMenuItem( aParentMenu, ID_MENU_CANVAS_CAIRO,
|
_( "Use Modern Toolset with software graphics (fall-back)" ),
|
||||||
text, _( "Use modern fallback (Cairo) graphics mode" ),
|
KiBitmap( tools_xpm ), wxITEM_RADIO );
|
||||||
wxITEM_RADIO ) );
|
|
||||||
|
|
||||||
aParentMenu->AppendSeparator();
|
aParentMenu->AppendSeparator();
|
||||||
|
|
||||||
|
@ -686,7 +683,7 @@ void prepareViewMenu( wxMenu* aParentMenu, bool aUseGal )
|
||||||
#else
|
#else
|
||||||
AddMenuItem( aParentMenu, ID_TB_OPTIONS_SELECT_CURSOR,
|
AddMenuItem( aParentMenu, ID_TB_OPTIONS_SELECT_CURSOR,
|
||||||
_( "Full Window Crosshair" ),
|
_( "Full Window Crosshair" ),
|
||||||
_( "Change cursor shape (not supported in Legacy graphics)" ),
|
_( "Change cursor shape (not supported in Legacy Toolset)" ),
|
||||||
KiBitmap( cursor_shape_xpm ), wxITEM_CHECK );
|
KiBitmap( cursor_shape_xpm ), wxITEM_CHECK );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -726,8 +723,8 @@ void prepareViewMenu( wxMenu* aParentMenu, bool aUseGal )
|
||||||
|
|
||||||
text = AddHotkeyName( _( "Sketch &Tracks" ), g_Pcbnew_Editor_Hotkeys_Descr,
|
text = AddHotkeyName( _( "Sketch &Tracks" ), g_Pcbnew_Editor_Hotkeys_Descr,
|
||||||
HK_SWITCH_TRACK_DISPLAY_MODE );
|
HK_SWITCH_TRACK_DISPLAY_MODE );
|
||||||
AddMenuItem( drawingModeSubMenu, ID_TB_OPTIONS_SHOW_TRACKS_SKETCH,
|
AddMenuItem( drawingModeSubMenu, ID_TB_OPTIONS_SHOW_TRACKS_SKETCH, text,
|
||||||
text, _( "Show tracks in outline mode" ),
|
_( "Show tracks in outline mode" ),
|
||||||
KiBitmap( showtrack_xpm ), wxITEM_CHECK );
|
KiBitmap( showtrack_xpm ), wxITEM_CHECK );
|
||||||
|
|
||||||
AddMenuItem( drawingModeSubMenu, ID_TB_OPTIONS_SHOW_GRAPHIC_SKETCH,
|
AddMenuItem( drawingModeSubMenu, ID_TB_OPTIONS_SHOW_GRAPHIC_SKETCH,
|
||||||
|
|
|
@ -444,8 +444,12 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_PCB_DRAW_VIA_BUTT:
|
case ID_PCB_DRAW_VIA_BUTT:
|
||||||
|
DisplayError( this, _( "Via Tool not available in Legacy Toolset" ) );
|
||||||
|
SetNoToolSelected();
|
||||||
|
break;
|
||||||
|
|
||||||
case ID_PCB_MEASUREMENT_TOOL:
|
case ID_PCB_MEASUREMENT_TOOL:
|
||||||
DisplayError( this, _( "This tool is not available in the legacy canvas" ) );
|
DisplayError( this, _( "Measurement Tool not available in Legacy Toolset" ) );
|
||||||
SetNoToolSelected();
|
SetNoToolSelected();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -477,8 +477,8 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||||
"and faster experience. This option is turned off by "
|
"and faster experience. This option is turned off by "
|
||||||
"default since it is not compatible with all computers.\n\n"
|
"default since it is not compatible with all computers.\n\n"
|
||||||
"Would you like to try enabling graphics acceleration?\n\n"
|
"Would you like to try enabling graphics acceleration?\n\n"
|
||||||
"If you'd like to choose later, select the Modern "
|
"If you'd like to choose later, select Modern Toolset "
|
||||||
"(Accelerated) graphics mode in the View menu." );
|
"(Accelerated) in the Preferences menu." );
|
||||||
|
|
||||||
wxMessageDialog dlg( this, msg, _( "Enable Graphics Acceleration" ),
|
wxMessageDialog dlg( this, msg, _( "Enable Graphics Acceleration" ),
|
||||||
wxYES_NO );
|
wxYES_NO );
|
||||||
|
|
|
@ -233,7 +233,7 @@ void FOOTPRINT_EDIT_FRAME::ReCreateOptToolbar()
|
||||||
#else
|
#else
|
||||||
m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString,
|
m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString,
|
||||||
KiScaledBitmap( cursor_shape_xpm, this ),
|
KiScaledBitmap( cursor_shape_xpm, this ),
|
||||||
_( "Change cursor shape (not supported in Legacy graphics)" ),
|
_( "Change cursor shape (not supported in Legacy Toolset)" ),
|
||||||
wxITEM_CHECK );
|
wxITEM_CHECK );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -381,7 +381,7 @@ void PCB_EDIT_FRAME::ReCreateOptToolbar()
|
||||||
#else
|
#else
|
||||||
m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString,
|
m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString,
|
||||||
KiScaledBitmap( cursor_shape_xpm, this ),
|
KiScaledBitmap( cursor_shape_xpm, this ),
|
||||||
_( "Change cursor shape (not supported in Legacy graphics)" ),
|
_( "Change cursor shape (not supported in Legacy Toolset)" ),
|
||||||
wxITEM_CHECK );
|
wxITEM_CHECK );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -135,8 +135,8 @@ void PCB_EDIT_FRAME::OnUpdateDrcEnable( wxUpdateUIEvent& aEvent )
|
||||||
aEvent.Check( state );
|
aEvent.Check( state );
|
||||||
m_optionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_DRC_OFF,
|
m_optionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_DRC_OFF,
|
||||||
Settings().m_legacyDrcOn ?
|
Settings().m_legacyDrcOn ?
|
||||||
_( "Disable design rule checking while routing/editing tracks using Legacy Graphics.\nUse Preferences > Interactive Routing... for Modern Canvas." ) :
|
_( "Disable design rule checking while routing/editing tracks using Legacy Toolset.\nUse Route > Interactive Router Settings... for Modern Toolset." ) :
|
||||||
_( "Enable design rule checking while routing/editing tracks using Legacy Graphics.\nUse Preferences > Interactive Routing... for Modern Canvas." ) );
|
_( "Enable design rule checking while routing/editing tracks using Legacy Toolset.\nUse Route > Interactive Router Settings... for Modern Toolset." ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void PCB_EDIT_FRAME::OnUpdateShowBoardRatsnest( wxUpdateUIEvent& aEvent )
|
void PCB_EDIT_FRAME::OnUpdateShowBoardRatsnest( wxUpdateUIEvent& aEvent )
|
||||||
|
|
|
@ -662,7 +662,8 @@ int DRAWING_TOOL::DrawGraphicPolygon( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
SCOPED_DRAW_MODE scopedDrawMode( m_mode, MODE::GRAPHIC_POLYGON );
|
SCOPED_DRAW_MODE scopedDrawMode( m_mode, MODE::GRAPHIC_POLYGON );
|
||||||
|
|
||||||
m_frame->SetToolID( ID_PCB_ADD_POLYGON_BUTT, wxCURSOR_PENCIL, _( "Add graphic polygon" ) );
|
m_frame->SetToolID( m_editModules ? ID_MODEDIT_POLYGON_TOOL : ID_PCB_ADD_POLYGON_BUTT,
|
||||||
|
wxCURSOR_PENCIL, _( "Add graphic polygon" ) );
|
||||||
|
|
||||||
return drawZone( false, ZONE_MODE::GRAPHIC_POLYGON );
|
return drawZone( false, ZONE_MODE::GRAPHIC_POLYGON );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue