Add missing option to show footprint texts in fill or sketch (line) mode.
This option is settable in stable version, but not in master. So, this option set from the stable version could be modified in master version.
This commit is contained in:
parent
951c78c901
commit
a12b803af5
|
@ -319,6 +319,10 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
|
|||
{
|
||||
return !disp_opt.m_DisplayModEdgeFill;
|
||||
};
|
||||
auto sketchModuleTextOutlinesCondition = [ &disp_opt ]( const SELECTION &aSel )
|
||||
{
|
||||
return !disp_opt.m_DisplayModTextFill;
|
||||
};
|
||||
|
||||
viewMenu->AddCheckItem( PCB_ACTIONS::showLayersManager, layersPaletteShownCondition );
|
||||
viewMenu->AddCheckItem( PCB_ACTIONS::showMicrowaveToolbar, microwaveToolbarShownCondition );
|
||||
|
@ -369,6 +373,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
|
|||
drawingModeSubMenu->AddSeparator();
|
||||
drawingModeSubMenu->AddCheckItem( PCB_ACTIONS::graphicDisplayMode, sketchGraphicsCondition );
|
||||
drawingModeSubMenu->AddCheckItem( PCB_ACTIONS::moduleEdgeOutlines, sketchModuleEdgeOutlinesCondition );
|
||||
drawingModeSubMenu->AddCheckItem( PCB_ACTIONS::moduleTextOutlines, sketchModuleTextOutlinesCondition );
|
||||
|
||||
viewMenu->AddMenu( drawingModeSubMenu );
|
||||
|
||||
|
|
|
@ -691,6 +691,11 @@ TOOL_ACTION PCB_ACTIONS::moduleEdgeOutlines( "pcbnew.Control.graphicOutlines",
|
|||
_( "Sketch Footprint Graphic Items" ), _( "Show footprint graphic items in outline mode" ),
|
||||
show_mod_edge_xpm );
|
||||
|
||||
TOOL_ACTION PCB_ACTIONS::moduleTextOutlines( "pcbnew.Control.fpTextOutlines",
|
||||
AS_GLOBAL, 0, "",
|
||||
_( "Line Mode Footprint Text Items" ), _( "Show footprint texts in line mode" ),
|
||||
text_sketch_xpm );
|
||||
|
||||
TOOL_ACTION PCB_ACTIONS::zoneDisplayEnable( "pcbnew.Control.zoneDisplayEnable",
|
||||
AS_GLOBAL, 0, "",
|
||||
_( "Fill Zones" ), _( "Show filled areas of zones" ),
|
||||
|
|
|
@ -368,6 +368,9 @@ public:
|
|||
/// Display module edges as outlines
|
||||
static TOOL_ACTION moduleEdgeOutlines;
|
||||
|
||||
/// Display module texts as lines
|
||||
static TOOL_ACTION moduleTextOutlines;
|
||||
|
||||
// Pad tools
|
||||
|
||||
/// Copy the selected pad's settings to the board design settings
|
||||
|
|
|
@ -248,6 +248,32 @@ int PCBNEW_CONTROL::ModuleEdgeOutlines( const TOOL_EVENT& aEvent )
|
|||
}
|
||||
|
||||
|
||||
int PCBNEW_CONTROL::ModuleTextOutlines( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
auto opts = displayOptions();
|
||||
|
||||
Flip( opts.m_DisplayModTextFill );
|
||||
m_frame->SetDisplayOptions( opts );
|
||||
view()->UpdateDisplayOptions( opts );
|
||||
|
||||
for( auto module : board()->Modules() )
|
||||
{
|
||||
view()->Update( &module->Reference(), KIGFX::GEOMETRY );
|
||||
view()->Update( &module->Value(), KIGFX::GEOMETRY );
|
||||
|
||||
for( auto item : module->GraphicalItems() )
|
||||
{
|
||||
if( item->Type() == PCB_MODULE_TEXT_T )
|
||||
view()->Update( item, KIGFX::GEOMETRY );
|
||||
}
|
||||
}
|
||||
|
||||
canvas()->Refresh();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int PCBNEW_CONTROL::ZoneDisplayMode( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
auto opts = displayOptions();
|
||||
|
@ -1075,6 +1101,7 @@ void PCBNEW_CONTROL::setTransitions()
|
|||
Go( &PCBNEW_CONTROL::ViaDisplayMode, PCB_ACTIONS::viaDisplayMode.MakeEvent() );
|
||||
Go( &PCBNEW_CONTROL::GraphicDisplayMode, PCB_ACTIONS::graphicDisplayMode.MakeEvent() );
|
||||
Go( &PCBNEW_CONTROL::ModuleEdgeOutlines, PCB_ACTIONS::moduleEdgeOutlines.MakeEvent() );
|
||||
Go( &PCBNEW_CONTROL::ModuleTextOutlines, PCB_ACTIONS::moduleTextOutlines.MakeEvent() );
|
||||
Go( &PCBNEW_CONTROL::ZoneDisplayMode, PCB_ACTIONS::zoneDisplayEnable.MakeEvent() );
|
||||
Go( &PCBNEW_CONTROL::ZoneDisplayMode, PCB_ACTIONS::zoneDisplayDisable.MakeEvent() );
|
||||
Go( &PCBNEW_CONTROL::ZoneDisplayMode, PCB_ACTIONS::zoneDisplayOutlines.MakeEvent() );
|
||||
|
|
|
@ -62,6 +62,7 @@ public:
|
|||
int ViaDisplayMode( const TOOL_EVENT& aEvent );
|
||||
int GraphicDisplayMode( const TOOL_EVENT& aEvent );
|
||||
int ModuleEdgeOutlines( const TOOL_EVENT& aEvent );
|
||||
int ModuleTextOutlines( const TOOL_EVENT& aEvent );
|
||||
int HighContrastMode( const TOOL_EVENT& aEvent );
|
||||
|
||||
// Layer control
|
||||
|
|
Loading…
Reference in New Issue