diff --git a/pcbnew/pcb_general_settings.cpp b/pcbnew/pcb_general_settings.cpp index d24b0b9543..e94de21f6d 100644 --- a/pcbnew/pcb_general_settings.cpp +++ b/pcbnew/pcb_general_settings.cpp @@ -26,16 +26,23 @@ PCB_GENERAL_SETTINGS::PCB_GENERAL_SETTINGS( FRAME_T aFrameType ) : m_frameType( aFrameType ), m_colorsSettings( aFrameType ) { - if( m_frameType == FRAME_PCB ) + switch( m_frameType ) { - Add( "LegacyAutoDeleteOldTrack", &m_legacyAutoDeleteOldTrack, true ); - Add( "LegacyUse45DegreeTracks",&m_legacyUse45DegreeTracks, true); - Add( "LegacyUseTwoSegmentTracks", &m_legacyUseTwoSegmentTracks, true); - Add( "Use45DegreeGraphicSegments", &m_use45DegreeGraphicSegments, false); - Add( "MagneticPads", reinterpret_cast( &m_magneticPads ), CAPTURE_CURSOR_IN_TRACK_TOOL ); - Add( "MagneticTracks", reinterpret_cast( &m_magneticTracks ), CAPTURE_CURSOR_IN_TRACK_TOOL ); - Add( "EditActionChangesTrackWidth", &m_editActionChangesTrackWidth, false ); - Add( "DragSelects", &m_dragSelects, true ); + case FRAME_PCB: + Add( "LegacyAutoDeleteOldTrack", &m_legacyAutoDeleteOldTrack, true ); + Add( "LegacyUse45DegreeTracks",&m_legacyUse45DegreeTracks, true); + Add( "LegacyUseTwoSegmentTracks", &m_legacyUseTwoSegmentTracks, true); + Add( "Use45DegreeGraphicSegments", &m_use45DegreeGraphicSegments, false); + Add( "MagneticPads", reinterpret_cast( &m_magneticPads ), CAPTURE_CURSOR_IN_TRACK_TOOL ); + Add( "MagneticTracks", reinterpret_cast( &m_magneticTracks ), CAPTURE_CURSOR_IN_TRACK_TOOL ); + 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 ); SETTINGS::Save( aCfg ); } + + +bool PCB_GENERAL_SETTINGS::m_use45DegreeGraphicSegments = false; +bool PCB_GENERAL_SETTINGS::m_dragSelects = true; diff --git a/pcbnew/pcb_general_settings.h b/pcbnew/pcb_general_settings.h index 62535045ac..bc8f953690 100644 --- a/pcbnew/pcb_general_settings.h +++ b/pcbnew/pcb_general_settings.h @@ -54,12 +54,13 @@ public: // always for temporary use bool m_legacyAutoDeleteOldTrack = true; 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_editActionChangesTrackWidth = false; - bool m_dragSelects = true; // True: Drag gesture always draws a selection box, - // False: Drag will preselect an item and move it + static bool m_dragSelects; // True: Drag gesture always draws a selection box, + // 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_magneticTracks = CAPTURE_CURSOR_IN_TRACK_TOOL;