Move microwave tools into a group on the main drawing toolbar
ADDED: Drawing group for microwave tools on main drawing toolbar REMVOED: Microwave toolbar no longer exists
This commit is contained in:
parent
e884f6d67b
commit
481026e901
|
@ -237,7 +237,6 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
|
|||
ACTION_MENU* viewMenu = new ACTION_MENU( false, selTool );
|
||||
|
||||
viewMenu->Add( PCB_ACTIONS::showLayersManager, ACTION_MENU::CHECK );
|
||||
viewMenu->Add( PCB_ACTIONS::showMicrowaveToolbar, ACTION_MENU::CHECK );
|
||||
viewMenu->Add( ACTIONS::showFootprintBrowser );
|
||||
viewMenu->Add( ACTIONS::show3DViewer );
|
||||
|
||||
|
|
|
@ -178,10 +178,8 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
|||
m_SelTrackWidthBox = NULL;
|
||||
m_SelViaSizeBox = NULL;
|
||||
m_SelLayerBox = NULL;
|
||||
m_show_microwave_tools = false;
|
||||
m_show_layer_manager_tools = true;
|
||||
m_hasAutoSave = true;
|
||||
m_microWaveToolBar = NULL;
|
||||
|
||||
// We don't know what state board was in when it was lasat saved, so we have to
|
||||
// assume dirty
|
||||
|
@ -220,7 +218,6 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
|||
ReCreateAuxiliaryToolbar();
|
||||
ReCreateVToolbar();
|
||||
ReCreateOptToolbar();
|
||||
ReCreateMicrowaveVToolbar();
|
||||
|
||||
m_selectionFilterPanel = new PANEL_SELECTION_FILTER( this );
|
||||
|
||||
|
@ -246,8 +243,6 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
|||
m_auimgr.AddPane( m_optionsToolBar,
|
||||
EDA_PANE().VToolbar().Name( "OptToolbar" ).Left().Layer(3) );
|
||||
|
||||
m_auimgr.AddPane( m_microWaveToolBar,
|
||||
EDA_PANE().VToolbar().Name( "MicrowaveToolbar" ).Right().Layer(2) );
|
||||
m_auimgr.AddPane( m_drawToolBar,
|
||||
EDA_PANE().VToolbar().Name( "ToolsToolbar" ).Right().Layer(3) );
|
||||
|
||||
|
@ -265,7 +260,6 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
|||
|
||||
m_auimgr.GetPane( "LayersManager" ).Show( m_show_layer_manager_tools );
|
||||
m_auimgr.GetPane( "SelectionFilter" ).Show( m_show_layer_manager_tools );
|
||||
m_auimgr.GetPane( "MicrowaveToolbar" ).Show( m_show_microwave_tools );
|
||||
|
||||
// The selection filter doesn't need to grow in the vertical direction when docked
|
||||
m_auimgr.GetPane( "SelectionFilter" ).dock_proportion = 0;
|
||||
|
@ -593,12 +587,6 @@ void PCB_EDIT_FRAME::setupUIConditions()
|
|||
return LayerManagerShown();
|
||||
};
|
||||
|
||||
auto microwaveToolbarCond =
|
||||
[this] ( const SELECTION& )
|
||||
{
|
||||
return MicrowaveToolbarShown();
|
||||
};
|
||||
|
||||
auto highContrastCond =
|
||||
[this] ( const SELECTION& )
|
||||
{
|
||||
|
@ -620,7 +608,6 @@ void PCB_EDIT_FRAME::setupUIConditions()
|
|||
mgr->SetConditions( ACTIONS::highContrastMode, CHECK( highContrastCond ) );
|
||||
mgr->SetConditions( PCB_ACTIONS::flipBoard, CHECK( boardFlippedCond ) );
|
||||
mgr->SetConditions( PCB_ACTIONS::showLayersManager, CHECK( layerManagerCond ) );
|
||||
mgr->SetConditions( PCB_ACTIONS::showMicrowaveToolbar, CHECK( microwaveToolbarCond ) );
|
||||
mgr->SetConditions( PCB_ACTIONS::showRatsnest, CHECK( globalRatsnestCond ) );
|
||||
mgr->SetConditions( PCB_ACTIONS::ratsnestLineMode, CHECK( curvedRatsnestCond ) );
|
||||
mgr->SetConditions( PCB_ACTIONS::boardSetup , ENABLE( enableBoardSetupCondition ) );
|
||||
|
@ -935,7 +922,6 @@ void PCB_EDIT_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg )
|
|||
{
|
||||
m_rotationAngle = cfg->m_RotationAngle;
|
||||
g_DrawDefaultLineThickness = Millimeter2iu( cfg->m_PlotLineWidth );
|
||||
m_show_microwave_tools = cfg->m_AuiPanels.show_microwave_tools;
|
||||
m_show_layer_manager_tools = cfg->m_AuiPanels.show_layer_manager;
|
||||
m_showPageLimits = cfg->m_ShowPageLimits;
|
||||
}
|
||||
|
@ -953,7 +939,6 @@ void PCB_EDIT_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg )
|
|||
{
|
||||
cfg->m_RotationAngle = m_rotationAngle;
|
||||
cfg->m_PlotLineWidth = Iu2Millimeter( g_DrawDefaultLineThickness );
|
||||
cfg->m_AuiPanels.show_microwave_tools = m_show_microwave_tools;
|
||||
cfg->m_AuiPanels.show_layer_manager = m_show_layer_manager_tools;
|
||||
cfg->m_AuiPanels.right_panel_width = m_appearancePanel->GetSize().x;
|
||||
cfg->m_AuiPanels.appearance_panel_tab = m_appearancePanel->GetTabIndex();
|
||||
|
@ -1102,9 +1087,6 @@ void PCB_EDIT_FRAME::ShowChangedLanguage()
|
|||
m_auimgr.Update();
|
||||
|
||||
m_appearancePanel->OnBoardChanged();
|
||||
|
||||
// pcbnew-specific toolbars
|
||||
ReCreateMicrowaveVToolbar();
|
||||
}
|
||||
|
||||
|
||||
|
@ -1589,7 +1571,6 @@ void PCB_EDIT_FRAME::CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVars
|
|||
PCB_BASE_EDIT_FRAME::CommonSettingsChanged( aEnvVarsChanged, aTextVarsChanged );
|
||||
|
||||
GetAppearancePanel()->OnColorThemeChanged();
|
||||
ReCreateMicrowaveVToolbar();
|
||||
|
||||
if( aTextVarsChanged )
|
||||
GetCanvas()->GetView()->UpdateAllItems( KIGFX::ALL );
|
||||
|
@ -1669,12 +1650,6 @@ bool PCB_EDIT_FRAME::LayerManagerShown()
|
|||
}
|
||||
|
||||
|
||||
bool PCB_EDIT_FRAME::MicrowaveToolbarShown()
|
||||
{
|
||||
return m_auimgr.GetPane( "MicrowaveToolbar" ).IsShown();
|
||||
}
|
||||
|
||||
|
||||
void PCB_EDIT_FRAME::onSize( wxSizeEvent& aEvent )
|
||||
{
|
||||
if( IsShown() )
|
||||
|
|
|
@ -80,9 +80,6 @@ class PCB_EDIT_FRAME : public PCB_BASE_EDIT_FRAME
|
|||
friend struct PCB::IFACE;
|
||||
friend class APPEARANCE_CONTROLS;
|
||||
|
||||
/// The auxiliary right vertical tool bar used to access the microwave tools.
|
||||
ACTION_TOOLBAR* m_microWaveToolBar;
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
|
@ -242,7 +239,6 @@ public:
|
|||
wxChoice* m_SelTrackWidthBox; // a choice box to display and select current track width
|
||||
wxChoice* m_SelViaSizeBox; // a choice box to display and select current via diameter
|
||||
|
||||
bool m_show_microwave_tools;
|
||||
bool m_show_layer_manager_tools;
|
||||
|
||||
bool m_ZoneFillsDirty; // Board has been modified since last zone fill.
|
||||
|
@ -325,7 +321,6 @@ public:
|
|||
// User interface update command event handlers.
|
||||
void OnUpdateLayerSelectBox( wxUpdateUIEvent& aEvent );
|
||||
bool LayerManagerShown();
|
||||
bool MicrowaveToolbarShown();
|
||||
void OnUpdateSelectViaSize( wxUpdateUIEvent& aEvent );
|
||||
void OnUpdateSelectTrackWidth( wxUpdateUIEvent& aEvent );
|
||||
|
||||
|
@ -419,7 +414,6 @@ public:
|
|||
void ReCreateHToolbar() override;
|
||||
void ReCreateAuxiliaryToolbar() override;
|
||||
void ReCreateVToolbar() override;
|
||||
void ReCreateMicrowaveVToolbar();
|
||||
void ReCreateOptToolbar() override;
|
||||
void ReCreateMenuBar() override;
|
||||
|
||||
|
@ -505,7 +499,6 @@ public:
|
|||
void PrepareLayerIndicator( bool aForceRebuild = false );
|
||||
|
||||
void ToggleLayersManager();
|
||||
void ToggleMicrowaveToolbar();
|
||||
|
||||
/**
|
||||
* Function DoGenFootprintsPositionFile
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
enum pcbnew_ids
|
||||
{
|
||||
ID_MAIN_MENUBAR = ID_END_LIST,
|
||||
ID_MICROWAVE_V_TOOLBAR,
|
||||
ID_COPY_BOARD_AS,
|
||||
ID_IMPORT_NON_KICAD_BOARD,
|
||||
|
||||
|
|
|
@ -82,9 +82,6 @@ PCBNEW_SETTINGS::PCBNEW_SETTINGS()
|
|||
m_params.emplace_back( new PARAM<bool>( "aui.show_layer_manager",
|
||||
&m_AuiPanels.show_layer_manager, true ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<bool>( "aui.show_microwave_tools",
|
||||
&m_AuiPanels.show_microwave_tools, false ) );
|
||||
|
||||
m_params.emplace_back(
|
||||
new PARAM<int>( "aui.right_panel_width", &m_AuiPanels.right_panel_width, -1 ) );
|
||||
|
||||
|
@ -496,7 +493,6 @@ bool PCBNEW_SETTINGS::MigrateFromLegacy( wxConfigBase* aCfg )
|
|||
// NOTE: there's no value in line-wrapping these; it just makes the table unreadable.
|
||||
//
|
||||
ret &= fromLegacy<bool>( aCfg, "ShowLayerManagerTools", "aui.show_layer_manager" );
|
||||
ret &= fromLegacy<bool>( aCfg, "ShowMicrowaveTools", "aui.show_microwave_tools" );
|
||||
|
||||
ret &= fromLegacy<int>( aCfg, "FootprintChooserHSashPosition", "footprint_chooser.sash_h" );
|
||||
ret &= fromLegacy<int>( aCfg, "FootprintChooserVSashPosition", "footprint_chooser.sash_v" );
|
||||
|
|
|
@ -69,7 +69,6 @@ public:
|
|||
{
|
||||
int appearance_panel_tab;
|
||||
int right_panel_width;
|
||||
bool show_microwave_tools;
|
||||
bool show_layer_manager;
|
||||
};
|
||||
|
||||
|
|
|
@ -365,7 +365,6 @@ void PCB_EDIT_FRAME::ReCreateOptToolbar()
|
|||
// Tools to show/hide toolbars:
|
||||
m_optionsToolBar->AddScaledSeparator( this );
|
||||
m_optionsToolBar->Add( PCB_ACTIONS::showLayersManager, ACTION_TOOLBAR::TOGGLE );
|
||||
m_optionsToolBar->Add( PCB_ACTIONS::showMicrowaveToolbar, ACTION_TOOLBAR::TOGGLE );
|
||||
|
||||
m_optionsToolBar->Realize();
|
||||
}
|
||||
|
@ -390,6 +389,7 @@ void PCB_EDIT_FRAME::ReCreateVToolbar()
|
|||
static ACTION_GROUP* dimensionGroup = nullptr;
|
||||
static ACTION_GROUP* originGroup = nullptr;
|
||||
static ACTION_GROUP* routingGroup = nullptr;
|
||||
static ACTION_GROUP* microwaveGroup = nullptr;
|
||||
|
||||
if( !dimensionGroup )
|
||||
{
|
||||
|
@ -414,6 +414,16 @@ void PCB_EDIT_FRAME::ReCreateVToolbar()
|
|||
&PCB_ACTIONS::routeDiffPair } );
|
||||
}
|
||||
|
||||
if( !microwaveGroup )
|
||||
{
|
||||
microwaveGroup = new ACTION_GROUP( "group.pcbMicrowave",
|
||||
{ &PCB_ACTIONS::microwaveCreateLine,
|
||||
&PCB_ACTIONS::microwaveCreateGap,
|
||||
&PCB_ACTIONS::microwaveCreateStub,
|
||||
&PCB_ACTIONS::microwaveCreateStubArc,
|
||||
&PCB_ACTIONS::microwaveCreateFunctionShape } );
|
||||
}
|
||||
|
||||
m_drawToolBar->Add( ACTIONS::selectionTool, ACTION_TOOLBAR::TOGGLE );
|
||||
m_drawToolBar->Add( PCB_ACTIONS::highlightNetTool, ACTION_TOOLBAR::TOGGLE );
|
||||
m_drawToolBar->Add( PCB_ACTIONS::localRatsnestTool, ACTION_TOOLBAR::TOGGLE );
|
||||
|
@ -422,6 +432,7 @@ void PCB_EDIT_FRAME::ReCreateVToolbar()
|
|||
m_drawToolBar->Add( PCB_ACTIONS::placeModule, ACTION_TOOLBAR::TOGGLE );
|
||||
m_drawToolBar->AddGroup( routingGroup, ACTION_TOOLBAR::TOGGLE );
|
||||
m_drawToolBar->Add( PCB_ACTIONS::drawVia, ACTION_TOOLBAR::TOGGLE );
|
||||
m_drawToolBar->AddGroup( microwaveGroup, ACTION_TOOLBAR::TOGGLE );
|
||||
m_drawToolBar->Add( PCB_ACTIONS::drawZone, ACTION_TOOLBAR::TOGGLE );
|
||||
m_drawToolBar->Add( PCB_ACTIONS::drawRuleArea, ACTION_TOOLBAR::TOGGLE );
|
||||
|
||||
|
@ -459,37 +470,6 @@ void PCB_EDIT_FRAME::ReCreateVToolbar()
|
|||
}
|
||||
|
||||
|
||||
/* Create the auxiliary vertical right toolbar, showing tools for microwave applications
|
||||
*/
|
||||
void PCB_EDIT_FRAME::ReCreateMicrowaveVToolbar()
|
||||
{
|
||||
wxWindowUpdateLocker dummy(this);
|
||||
|
||||
if( m_microWaveToolBar )
|
||||
{
|
||||
m_microWaveToolBar->ClearToolbar();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_microWaveToolBar = new ACTION_TOOLBAR( this, ID_MICROWAVE_V_TOOLBAR, wxDefaultPosition,
|
||||
wxDefaultSize,
|
||||
KICAD_AUI_TB_STYLE | wxAUI_TB_VERTICAL );
|
||||
m_microWaveToolBar->SetAuiManager( &m_auimgr );
|
||||
}
|
||||
|
||||
// Set up toolbar
|
||||
m_microWaveToolBar->Add( PCB_ACTIONS::microwaveCreateLine, ACTION_TOOLBAR::TOGGLE );
|
||||
m_microWaveToolBar->Add( PCB_ACTIONS::microwaveCreateGap, ACTION_TOOLBAR::TOGGLE );
|
||||
|
||||
m_microWaveToolBar->AddScaledSeparator( this );
|
||||
m_microWaveToolBar->Add( PCB_ACTIONS::microwaveCreateStub, ACTION_TOOLBAR::TOGGLE );
|
||||
m_microWaveToolBar->Add( PCB_ACTIONS::microwaveCreateStubArc, ACTION_TOOLBAR::TOGGLE );
|
||||
m_microWaveToolBar->Add( PCB_ACTIONS::microwaveCreateFunctionShape, ACTION_TOOLBAR::TOGGLE );
|
||||
|
||||
m_microWaveToolBar->Realize();
|
||||
}
|
||||
|
||||
|
||||
void PCB_EDIT_FRAME::ReCreateAuxiliaryToolbar()
|
||||
{
|
||||
wxWindowUpdateLocker dummy( this );
|
||||
|
@ -689,14 +669,6 @@ void PCB_EDIT_FRAME::ToggleLayersManager()
|
|||
}
|
||||
|
||||
|
||||
void PCB_EDIT_FRAME::ToggleMicrowaveToolbar()
|
||||
{
|
||||
m_show_microwave_tools = !m_show_microwave_tools;
|
||||
m_auimgr.GetPane( "MicrowaveToolbar" ).Show( m_show_microwave_tools );
|
||||
m_auimgr.Update();
|
||||
}
|
||||
|
||||
|
||||
void PCB_EDIT_FRAME::OnUpdateSelectTrackWidth( wxUpdateUIEvent& aEvent )
|
||||
{
|
||||
if( aEvent.GetId() == ID_AUX_TOOLBAR_PCB_TRACK_WIDTH )
|
||||
|
|
|
@ -740,11 +740,6 @@ TOOL_ACTION PCB_ACTIONS::showLayersManager( "pcbnew.Control.showLayersManager",
|
|||
_( "Show Appearance Manager" ), _( "Show/hide the appearance manager" ),
|
||||
layers_manager_xpm );
|
||||
|
||||
TOOL_ACTION PCB_ACTIONS::showMicrowaveToolbar( "pcbnew.Control.showMicrowaveToolbar",
|
||||
AS_GLOBAL, 0, "",
|
||||
_( "Show Microwave Toolbar" ), _( "Show/hide microwave toolbar\n(Experimental feature)" ),
|
||||
mw_toolbar_xpm );
|
||||
|
||||
TOOL_ACTION PCB_ACTIONS::flipBoard( "pcbnew.Control.flipBoard",
|
||||
AS_GLOBAL, 0, "",
|
||||
_( "Flip Board View" ), _( "Flip (mirror) the board view" ),
|
||||
|
|
|
@ -333,7 +333,6 @@ public:
|
|||
|
||||
static TOOL_ACTION editFpInFpEditor;
|
||||
static TOOL_ACTION showLayersManager;
|
||||
static TOOL_ACTION showMicrowaveToolbar;
|
||||
static TOOL_ACTION showPythonConsole;
|
||||
|
||||
// Module editor tools
|
||||
|
|
|
@ -557,13 +557,6 @@ int PCB_EDITOR_CONTROL::ToggleLayersManager( const TOOL_EVENT& aEvent )
|
|||
}
|
||||
|
||||
|
||||
int PCB_EDITOR_CONTROL::ToggleMicrowaveToolbar( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
getEditFrame<PCB_EDIT_FRAME>()->ToggleMicrowaveToolbar();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int PCB_EDITOR_CONTROL::TogglePythonConsole( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
#if defined( KICAD_SCRIPTING_WXPYTHON )
|
||||
|
@ -1509,7 +1502,6 @@ void PCB_EDITOR_CONTROL::setTransitions()
|
|||
Go( &PCB_EDITOR_CONTROL::UpdateSchematicFromPCB, ACTIONS::updateSchematicFromPcb.MakeEvent() );
|
||||
Go( &PCB_EDITOR_CONTROL::ShowEeschema, PCB_ACTIONS::showEeschema.MakeEvent() );
|
||||
Go( &PCB_EDITOR_CONTROL::ToggleLayersManager, PCB_ACTIONS::showLayersManager.MakeEvent() );
|
||||
Go( &PCB_EDITOR_CONTROL::ToggleMicrowaveToolbar, PCB_ACTIONS::showMicrowaveToolbar.MakeEvent() );
|
||||
Go( &PCB_EDITOR_CONTROL::TogglePythonConsole, PCB_ACTIONS::showPythonConsole.MakeEvent() );
|
||||
Go( &PCB_EDITOR_CONTROL::FlipPcbView, PCB_ACTIONS::flipBoard.MakeEvent() );
|
||||
Go( &PCB_EDITOR_CONTROL::RepairBoard, PCB_ACTIONS::repairBoard.MakeEvent() );
|
||||
|
|
|
@ -72,7 +72,6 @@ public:
|
|||
int UpdateSchematicFromPCB( const TOOL_EVENT& aEvent );
|
||||
int ShowEeschema( const TOOL_EVENT& aEvent );
|
||||
int ToggleLayersManager( const TOOL_EVENT& aEvent );
|
||||
int ToggleMicrowaveToolbar( const TOOL_EVENT& aEvent );
|
||||
int TogglePythonConsole( const TOOL_EVENT& aEvent );
|
||||
|
||||
// Track & via size control
|
||||
|
|
Loading…
Reference in New Issue