Share certain settings between board and footprint editor
45 degree graphics segments and selection vs dragging preference should use the same setting in both applications.
This commit is contained in:
parent
9127e09815
commit
de6b32d236
|
@ -26,16 +26,23 @@
|
||||||
PCB_GENERAL_SETTINGS::PCB_GENERAL_SETTINGS( FRAME_T aFrameType )
|
PCB_GENERAL_SETTINGS::PCB_GENERAL_SETTINGS( FRAME_T aFrameType )
|
||||||
: m_frameType( aFrameType ), m_colorsSettings( aFrameType )
|
: m_frameType( aFrameType ), m_colorsSettings( aFrameType )
|
||||||
{
|
{
|
||||||
if( m_frameType == FRAME_PCB )
|
switch( m_frameType )
|
||||||
{
|
{
|
||||||
Add( "LegacyAutoDeleteOldTrack", &m_legacyAutoDeleteOldTrack, true );
|
case FRAME_PCB:
|
||||||
Add( "LegacyUse45DegreeTracks",&m_legacyUse45DegreeTracks, true);
|
Add( "LegacyAutoDeleteOldTrack", &m_legacyAutoDeleteOldTrack, true );
|
||||||
Add( "LegacyUseTwoSegmentTracks", &m_legacyUseTwoSegmentTracks, true);
|
Add( "LegacyUse45DegreeTracks",&m_legacyUse45DegreeTracks, true);
|
||||||
Add( "Use45DegreeGraphicSegments", &m_use45DegreeGraphicSegments, false);
|
Add( "LegacyUseTwoSegmentTracks", &m_legacyUseTwoSegmentTracks, true);
|
||||||
Add( "MagneticPads", reinterpret_cast<int*>( &m_magneticPads ), CAPTURE_CURSOR_IN_TRACK_TOOL );
|
Add( "Use45DegreeGraphicSegments", &m_use45DegreeGraphicSegments, false);
|
||||||
Add( "MagneticTracks", reinterpret_cast<int*>( &m_magneticTracks ), CAPTURE_CURSOR_IN_TRACK_TOOL );
|
Add( "MagneticPads", reinterpret_cast<int*>( &m_magneticPads ), CAPTURE_CURSOR_IN_TRACK_TOOL );
|
||||||
Add( "EditActionChangesTrackWidth", &m_editActionChangesTrackWidth, false );
|
Add( "MagneticTracks", reinterpret_cast<int*>( &m_magneticTracks ), CAPTURE_CURSOR_IN_TRACK_TOOL );
|
||||||
Add( "DragSelects", &m_dragSelects, true );
|
Add( "EditActionChangesTrackWidth", &m_editActionChangesTrackWidth, false );
|
||||||
|
Add( "DragSelects", &m_dragSelects, true );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case FRAME_PCB_MODULE_EDITOR:
|
||||||
|
Add( "Use45DegreeGraphicSegments", &m_use45DegreeGraphicSegments, false);
|
||||||
|
Add( "DragSelects", &m_dragSelects, true );
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,3 +59,7 @@ void PCB_GENERAL_SETTINGS::Save( wxConfigBase* aCfg )
|
||||||
m_colorsSettings.Save( aCfg );
|
m_colorsSettings.Save( aCfg );
|
||||||
SETTINGS::Save( aCfg );
|
SETTINGS::Save( aCfg );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool PCB_GENERAL_SETTINGS::m_use45DegreeGraphicSegments = false;
|
||||||
|
bool PCB_GENERAL_SETTINGS::m_dragSelects = true;
|
||||||
|
|
|
@ -54,12 +54,13 @@ public:
|
||||||
// always for temporary use
|
// always for temporary use
|
||||||
bool m_legacyAutoDeleteOldTrack = true;
|
bool m_legacyAutoDeleteOldTrack = true;
|
||||||
bool m_legacyUse45DegreeTracks = true; // True to allow horiz, vert. and 45deg only tracks
|
bool m_legacyUse45DegreeTracks = true; // True to allow horiz, vert. and 45deg only tracks
|
||||||
bool m_use45DegreeGraphicSegments = false; // True to allow horiz, vert. and 45deg only graphic segments
|
static bool m_use45DegreeGraphicSegments; // True to allow horizontal, vertical and
|
||||||
|
// 45deg only graphic segments
|
||||||
bool m_legacyUseTwoSegmentTracks = true;
|
bool m_legacyUseTwoSegmentTracks = true;
|
||||||
|
|
||||||
bool m_editActionChangesTrackWidth = false;
|
bool m_editActionChangesTrackWidth = false;
|
||||||
bool m_dragSelects = true; // True: Drag gesture always draws a selection box,
|
static bool m_dragSelects; // True: Drag gesture always draws a selection box,
|
||||||
// False: Drag will preselect an item and move it
|
// False: Drag will preselect an item and move it
|
||||||
|
|
||||||
MAGNETIC_PAD_OPTION_VALUES m_magneticPads = CAPTURE_CURSOR_IN_TRACK_TOOL;
|
MAGNETIC_PAD_OPTION_VALUES m_magneticPads = CAPTURE_CURSOR_IN_TRACK_TOOL;
|
||||||
MAGNETIC_PAD_OPTION_VALUES m_magneticTracks = CAPTURE_CURSOR_IN_TRACK_TOOL;
|
MAGNETIC_PAD_OPTION_VALUES m_magneticTracks = CAPTURE_CURSOR_IN_TRACK_TOOL;
|
||||||
|
|
Loading…
Reference in New Issue