void DIALOG_GENERALOPTIONS::init() { SetFocus(); m_sdbSizerOK->SetDefault(); m_Board = GetParent()->GetBoard(); DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetParent()->GetDisplayOptions(); /* Set display options */ m_PolarDisplay->SetSelection( displ_opts->m_DisplayPolarCood ? 1 : 0 ); m_UnitsSelection->SetSelection( g_UserUnit ? 1 : 0 ); wxString rotationAngle; rotationAngle = AngleToStringDegrees( (double)GetParent()->GetRotationAngle() ); m_RotationAngle->SetValue( rotationAngle ); wxString timevalue; timevalue << GetParent()->GetAutoSaveInterval() / 60; m_SaveTime->SetValue( timevalue ); m_MaxShowLinks->SetValue( displ_opts->m_MaxLinksShowed ); m_DrcOn->SetValue( g_Drc_On ); m_ShowGlobalRatsnest->SetValue( m_Board->IsElementVisible( LAYER_RATSNEST ) ); m_TrackAutodel->SetValue( g_AutoDeleteOldTrack ); m_Track_45_Only_Ctrl->SetValue( g_Track_45_Only_Allowed ); m_Segments_45_Only_Ctrl->SetValue( g_Segments_45_Only ); m_ZoomCenterOpt->SetValue( ! GetParent()->GetCanvas()->GetEnableZoomNoCenter() ); m_MousewheelPANOpt->SetValue( GetParent()->GetCanvas()->GetEnableMousewheelPan() ); m_AutoPANOpt->SetValue( GetParent()->GetCanvas()->GetEnableAutoPan() ); m_Track_DoubleSegm_Ctrl->SetValue( g_TwoSegmentTrackBuild ); m_MagneticPadOptCtrl->SetSelection( g_MagneticPadOption ); m_MagneticTrackOptCtrl->SetSelection( g_MagneticTrackOption ); }
void DIALOG_GENERALOPTIONS::init() { SetFocus(); m_sdbSizerOK->SetDefault(); m_Board = GetParent()->GetBoard(); DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetParent()->GetDisplayOptions(); /* Set display options */ m_PolarDisplay->SetSelection( displ_opts->m_DisplayPolarCood ? 1 : 0 ); m_UnitsSelection->SetSelection( g_UserUnit ? 1 : 0 ); m_CursorShape->SetSelection( GetParent()->GetCursorShape() ? 1 : 0 ); wxString rotationAngle; rotationAngle = AngleToStringDegrees( (double)GetParent()->GetRotationAngle() ); m_RotationAngle->SetValue( rotationAngle ); wxString timevalue; timevalue << GetParent()->GetAutoSaveInterval() / 60; m_SaveTime->SetValue( timevalue ); m_MaxShowLinks->SetValue( displ_opts->m_MaxLinksShowed ); m_DrcOn->SetValue( g_Drc_On ); m_ShowModuleRatsnest->SetValue( displ_opts->m_Show_Module_Ratsnest ); m_ShowGlobalRatsnest->SetValue( m_Board->IsElementVisible( RATSNEST_VISIBLE ) ); m_TrackAutodel->SetValue( g_AutoDeleteOldTrack ); m_Track_45_Only_Ctrl->SetValue( g_Track_45_Only_Allowed ); m_Segments_45_Only_Ctrl->SetValue( g_Segments_45_Only ); m_ZoomNoCenterOpt->SetValue( GetParent()->GetCanvas()->GetEnableZoomNoCenter() ); m_MiddleButtonPANOpt->SetValue( GetParent()->GetCanvas()->GetEnableMiddleButtonPan() ); m_OptMiddleButtonPanLimited->SetValue( GetParent()->GetCanvas()->GetMiddleButtonPanLimited() ); m_OptMiddleButtonPanLimited->Enable( m_MiddleButtonPANOpt->GetValue() ); m_AutoPANOpt->SetValue( GetParent()->GetCanvas()->GetEnableAutoPan() ); m_Track_DoubleSegm_Ctrl->SetValue( g_TwoSegmentTrackBuild ); m_MagneticPadOptCtrl->SetSelection( g_MagneticPadOption ); m_MagneticTrackOptCtrl->SetSelection( g_MagneticTrackOption ); m_UseOldZoneFillingAlgo->SetValue ( g_UseOldZoneFillingAlgo ); m_DumpZonesWhenFilling->SetValue ( g_DumpZonesWhenFilling ); }