From 7313b28e2a1dde57fafcc1e525603b6d3610e1d6 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 13 Feb 2016 16:34:52 +0100 Subject: [PATCH] Cvpcb: minor change in menubar: change menu name "files" to "Save" (there is no more files to read or save). Pcbnew, pad properies editor: show Axis (pad origin) in GAL mode (it was already shown in legacy mode). --- cvpcb/menubar.cpp | 10 +++++----- pcbnew/dialogs/dialog_pad_properties.cpp | 12 ++++++++++++ 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/cvpcb/menubar.cpp b/cvpcb/menubar.cpp index 7be428cf1d..eae2ce37af 100644 --- a/cvpcb/menubar.cpp +++ b/cvpcb/menubar.cpp @@ -66,7 +66,9 @@ void CVPCB_MAINFRAME::ReCreateMenuBar() // Save the footprints back into eeschema AddMenuItem( filesMenu, wxID_SAVE, - _( "&Save Edits\tCtrl+S" ), SAVE_HLP_MSG, KiBitmap( save_xpm ) ); + _( "&Save Edits\tCtrl+S" ), + _( "Save footprint association in schematic component footprint fields" ), + KiBitmap( save_xpm ) ); // Separator filesMenu->AppendSeparator(); @@ -110,9 +112,7 @@ void CVPCB_MAINFRAME::ReCreateMenuBar() // Separator preferencesMenu->AppendSeparator(); AddMenuItem( preferencesMenu, ID_SAVE_PROJECT, - _( "&Save Project File" ), - _( "Save changes to the project configuration file" ), - KiBitmap( save_setup_xpm ) ); + _( "&Save Project File" ), SAVE_HLP_MSG, KiBitmap( save_setup_xpm ) ); // Menu Help: wxMenu* helpMenu = new wxMenu; @@ -138,7 +138,7 @@ void CVPCB_MAINFRAME::ReCreateMenuBar() KiBitmap( info_xpm ) ); // Create the menubar and append all submenus - menuBar->Append( filesMenu, _( "&File" ) ); + menuBar->Append( filesMenu, _( "&Save" ) ); menuBar->Append( preferencesMenu, _( "&Preferences" ) ); menuBar->Append( helpMenu, _( "&Help" ) ); diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp index 7f5e43234c..5b674e6213 100644 --- a/pcbnew/dialogs/dialog_pad_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_properties.cpp @@ -46,6 +46,8 @@ #include #include +#include + #include #include @@ -94,10 +96,12 @@ public: ~DIALOG_PAD_PROPERTIES() { delete m_dummyPad; + delete m_axisOrigin; } private: PCB_BASE_FRAME* m_parent; + KIGFX::ORIGIN_VIEWITEM* m_axisOrigin; D_PAD* m_currentPad; // pad currently being edited D_PAD* m_dummyPad; // a working copy used to show changes D_PAD* m_padMaster; // The pad used to create new pads in board or @@ -178,6 +182,13 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aP else // We are editing a "master" pad, i.e. a pad used to create new pads m_dummyPad->Copy( m_padMaster ); + m_axisOrigin = new KIGFX::ORIGIN_VIEWITEM( KIGFX::COLOR4D(0.0, 0.0, 0.8, 1.0), + KIGFX::ORIGIN_VIEWITEM::CROSS, + 20000, + VECTOR2D( m_dummyPad->GetPosition().x, + m_dummyPad->GetPosition().y ) ); + m_axisOrigin->SetDrawAtZero( true ); + if( m_parent->IsGalCanvasActive() ) { m_panelShowPadGal->UseColorScheme( m_board->GetColorsSettings() ); @@ -185,6 +196,7 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aP m_panelShowPadGal->Show(); m_panelShowPad->Hide(); m_panelShowPadGal->GetView()->Add( m_dummyPad ); + m_panelShowPadGal->GetView()->Add( m_axisOrigin ); m_panelShowPadGal->StartDrawing(); Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_PAD_PROPERTIES::OnResize ) );