Separate Footprint Editor's sketch modes from PCB Editor's.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15345
This commit is contained in:
parent
7bd6c9d623
commit
f7420bc820
|
@ -27,7 +27,7 @@
|
||||||
#include <project/board_project_settings.h>
|
#include <project/board_project_settings.h>
|
||||||
|
|
||||||
|
|
||||||
class FOOTPRINT_EDITOR_SETTINGS : public APP_SETTINGS_BASE
|
class FOOTPRINT_EDITOR_SETTINGS : public PCB_VIEWERS_SETTINGS_BASE
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
struct AUI_PANELS
|
struct AUI_PANELS
|
||||||
|
|
|
@ -37,7 +37,7 @@ const int fpEditSchemaVersion = 2;
|
||||||
|
|
||||||
|
|
||||||
FOOTPRINT_EDITOR_SETTINGS::FOOTPRINT_EDITOR_SETTINGS() :
|
FOOTPRINT_EDITOR_SETTINGS::FOOTPRINT_EDITOR_SETTINGS() :
|
||||||
APP_SETTINGS_BASE( "fpedit", fpEditSchemaVersion ),
|
PCB_VIEWERS_SETTINGS_BASE( "fpedit", fpEditSchemaVersion ),
|
||||||
m_DesignSettings( nullptr, "fpedit.settings" ),
|
m_DesignSettings( nullptr, "fpedit.settings" ),
|
||||||
m_MagneticItems(),
|
m_MagneticItems(),
|
||||||
m_Display(),
|
m_Display(),
|
||||||
|
@ -88,6 +88,18 @@ FOOTPRINT_EDITOR_SETTINGS::FOOTPRINT_EDITOR_SETTINGS() :
|
||||||
m_params.emplace_back( new PARAM<wxString>( "system.last_import_export_path",
|
m_params.emplace_back( new PARAM<wxString>( "system.last_import_export_path",
|
||||||
&m_LastExportPath, "" ) );
|
&m_LastExportPath, "" ) );
|
||||||
|
|
||||||
|
m_params.emplace_back( new PARAM<bool>( "pcb_display.graphics_fill",
|
||||||
|
&m_ViewersDisplay.m_DisplayGraphicsFill, true ) );
|
||||||
|
|
||||||
|
m_params.emplace_back( new PARAM<bool>( "pcb_display.text_fill",
|
||||||
|
&m_ViewersDisplay.m_DisplayTextFill, true ) );
|
||||||
|
|
||||||
|
m_params.emplace_back( new PARAM<bool>( "pcb_display.pad_fill",
|
||||||
|
&m_ViewersDisplay.m_DisplayPadFill, true ) );
|
||||||
|
|
||||||
|
m_params.emplace_back( new PARAM<bool>( "pcb_display.pad_numbers",
|
||||||
|
&m_ViewersDisplay.m_DisplayPadNumbers, true ) );
|
||||||
|
|
||||||
m_params.emplace_back( new PARAM<wxString>( "window.footprint_text_shown_columns",
|
m_params.emplace_back( new PARAM<wxString>( "window.footprint_text_shown_columns",
|
||||||
&m_FootprintTextShownColumns, "0 1 2 3 4 5 6" ) );
|
&m_FootprintTextShownColumns, "0 1 2 3 4 5 6" ) );
|
||||||
|
|
||||||
|
|
|
@ -925,12 +925,14 @@ PCB_VIEWERS_SETTINGS_BASE* PCB_BASE_FRAME::GetViewerSettingsBase() const
|
||||||
switch( GetFrameType() )
|
switch( GetFrameType() )
|
||||||
{
|
{
|
||||||
case FRAME_PCB_EDITOR:
|
case FRAME_PCB_EDITOR:
|
||||||
case FRAME_FOOTPRINT_EDITOR:
|
|
||||||
case FRAME_FOOTPRINT_WIZARD:
|
|
||||||
case FRAME_PCB_DISPLAY3D:
|
case FRAME_PCB_DISPLAY3D:
|
||||||
default:
|
default:
|
||||||
return Pgm().GetSettingsManager().GetAppSettings<PCBNEW_SETTINGS>();
|
return Pgm().GetSettingsManager().GetAppSettings<PCBNEW_SETTINGS>();
|
||||||
|
|
||||||
|
case FRAME_FOOTPRINT_EDITOR:
|
||||||
|
case FRAME_FOOTPRINT_WIZARD:
|
||||||
|
return Pgm().GetSettingsManager().GetAppSettings<FOOTPRINT_EDITOR_SETTINGS>();
|
||||||
|
|
||||||
case FRAME_FOOTPRINT_VIEWER:
|
case FRAME_FOOTPRINT_VIEWER:
|
||||||
case FRAME_FOOTPRINT_CHOOSER:
|
case FRAME_FOOTPRINT_CHOOSER:
|
||||||
case FRAME_FOOTPRINT_PREVIEW:
|
case FRAME_FOOTPRINT_PREVIEW:
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
#include <settings/settings_manager.h>
|
#include <settings/settings_manager.h>
|
||||||
#include <settings/cvpcb_settings.h>
|
#include <settings/cvpcb_settings.h>
|
||||||
#include <pcbnew_settings.h>
|
#include <pcbnew_settings.h>
|
||||||
|
#include <footprint_editor_settings.h>
|
||||||
|
|
||||||
#include <convert_basic_shapes_to_polygon.h>
|
#include <convert_basic_shapes_to_polygon.h>
|
||||||
#include <gal/graphics_abstraction_layer.h>
|
#include <gal/graphics_abstraction_layer.h>
|
||||||
|
@ -81,12 +82,14 @@ PCB_VIEWERS_SETTINGS_BASE* PCB_PAINTER::viewer_settings()
|
||||||
switch( m_frameType )
|
switch( m_frameType )
|
||||||
{
|
{
|
||||||
case FRAME_PCB_EDITOR:
|
case FRAME_PCB_EDITOR:
|
||||||
case FRAME_FOOTPRINT_EDITOR:
|
|
||||||
case FRAME_FOOTPRINT_WIZARD:
|
|
||||||
case FRAME_PCB_DISPLAY3D:
|
case FRAME_PCB_DISPLAY3D:
|
||||||
default:
|
default:
|
||||||
return Pgm().GetSettingsManager().GetAppSettings<PCBNEW_SETTINGS>();
|
return Pgm().GetSettingsManager().GetAppSettings<PCBNEW_SETTINGS>();
|
||||||
|
|
||||||
|
case FRAME_FOOTPRINT_EDITOR:
|
||||||
|
case FRAME_FOOTPRINT_WIZARD:
|
||||||
|
return Pgm().GetSettingsManager().GetAppSettings<FOOTPRINT_EDITOR_SETTINGS>();
|
||||||
|
|
||||||
case FRAME_FOOTPRINT_VIEWER:
|
case FRAME_FOOTPRINT_VIEWER:
|
||||||
case FRAME_FOOTPRINT_CHOOSER:
|
case FRAME_FOOTPRINT_CHOOSER:
|
||||||
case FRAME_FOOTPRINT_PREVIEW:
|
case FRAME_FOOTPRINT_PREVIEW:
|
||||||
|
|
|
@ -172,6 +172,14 @@ static struct IFACE : public KIFACE_BASE, public UNITS_PROVIDER
|
||||||
return new PANEL_GRID_SETTINGS( aParent, this, frame, cfg, FRAME_FOOTPRINT_EDITOR );
|
return new PANEL_GRID_SETTINGS( aParent, this, frame, cfg, FRAME_FOOTPRINT_EDITOR );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case PANEL_FP_ORIGINS_AXES:
|
||||||
|
{
|
||||||
|
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
|
||||||
|
APP_SETTINGS_BASE* cfg = mgr.GetAppSettings<FOOTPRINT_EDITOR_SETTINGS>();
|
||||||
|
|
||||||
|
return new PANEL_PCBNEW_DISPLAY_ORIGIN( aParent, cfg, FRAME_FOOTPRINT_EDITOR );
|
||||||
|
}
|
||||||
|
|
||||||
case PANEL_FP_EDIT_OPTIONS:
|
case PANEL_FP_EDIT_OPTIONS:
|
||||||
{
|
{
|
||||||
EDA_BASE_FRAME* frame = aKiway->Player( FRAME_FOOTPRINT_EDITOR, false );
|
EDA_BASE_FRAME* frame = aKiway->Player( FRAME_FOOTPRINT_EDITOR, false );
|
||||||
|
@ -210,19 +218,11 @@ static struct IFACE : public KIFACE_BASE, public UNITS_PROVIDER
|
||||||
case PANEL_PCB_DISPLAY_OPTS:
|
case PANEL_PCB_DISPLAY_OPTS:
|
||||||
{
|
{
|
||||||
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
|
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
|
||||||
APP_SETTINGS_BASE* cfg = mgr.GetAppSettings<FOOTPRINT_EDITOR_SETTINGS>();
|
APP_SETTINGS_BASE* cfg = mgr.GetAppSettings<PCBNEW_SETTINGS>();
|
||||||
|
|
||||||
return new PANEL_PCB_DISPLAY_OPTIONS( aParent, cfg );
|
return new PANEL_PCB_DISPLAY_OPTIONS( aParent, cfg );
|
||||||
}
|
}
|
||||||
|
|
||||||
case PANEL_FP_ORIGINS_AXES:
|
|
||||||
{
|
|
||||||
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
|
|
||||||
APP_SETTINGS_BASE* cfg = mgr.GetAppSettings<FOOTPRINT_EDITOR_SETTINGS>();
|
|
||||||
|
|
||||||
return new PANEL_PCBNEW_DISPLAY_ORIGIN( aParent, cfg, FRAME_FOOTPRINT_EDITOR );
|
|
||||||
}
|
|
||||||
|
|
||||||
case PANEL_PCB_GRIDS:
|
case PANEL_PCB_GRIDS:
|
||||||
{
|
{
|
||||||
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
|
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
|
||||||
|
@ -241,6 +241,14 @@ static struct IFACE : public KIFACE_BASE, public UNITS_PROVIDER
|
||||||
return new PANEL_GRID_SETTINGS( aParent, this, frame, cfg, FRAME_PCB_EDITOR );
|
return new PANEL_GRID_SETTINGS( aParent, this, frame, cfg, FRAME_PCB_EDITOR );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case PANEL_PCB_ORIGINS_AXES:
|
||||||
|
{
|
||||||
|
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
|
||||||
|
APP_SETTINGS_BASE* cfg = mgr.GetAppSettings<PCBNEW_SETTINGS>();
|
||||||
|
|
||||||
|
return new PANEL_PCBNEW_DISPLAY_ORIGIN( aParent, cfg, FRAME_PCB_EDITOR );
|
||||||
|
}
|
||||||
|
|
||||||
case PANEL_PCB_EDIT_OPTIONS:
|
case PANEL_PCB_EDIT_OPTIONS:
|
||||||
{
|
{
|
||||||
EDA_BASE_FRAME* frame = aKiway->Player( FRAME_PCB_EDITOR, false );
|
EDA_BASE_FRAME* frame = aKiway->Player( FRAME_PCB_EDITOR, false );
|
||||||
|
@ -271,14 +279,6 @@ static struct IFACE : public KIFACE_BASE, public UNITS_PROVIDER
|
||||||
case PANEL_PCB_ACTION_PLUGINS:
|
case PANEL_PCB_ACTION_PLUGINS:
|
||||||
return new PANEL_PCBNEW_ACTION_PLUGINS( aParent );
|
return new PANEL_PCBNEW_ACTION_PLUGINS( aParent );
|
||||||
|
|
||||||
case PANEL_PCB_ORIGINS_AXES:
|
|
||||||
{
|
|
||||||
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
|
|
||||||
APP_SETTINGS_BASE* cfg = mgr.GetAppSettings<PCBNEW_SETTINGS>();
|
|
||||||
|
|
||||||
return new PANEL_PCBNEW_DISPLAY_ORIGIN( aParent, cfg, FRAME_PCB_EDITOR );
|
|
||||||
}
|
|
||||||
|
|
||||||
case PANEL_3DV_DISPLAY_OPTIONS:
|
case PANEL_3DV_DISPLAY_OPTIONS:
|
||||||
return new PANEL_3D_DISPLAY_OPTIONS( aParent );
|
return new PANEL_3D_DISPLAY_OPTIONS( aParent );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue