mirror of
https://github.com/leozide/leocad
synced 2024-12-25 21:58:23 +01:00
Merged duplicate preview view sphere settings.
This commit is contained in:
parent
18ad850e1a
commit
81817ac4ad
6 changed files with 8 additions and 12 deletions
|
@ -59,7 +59,6 @@ void lcPreferences::LoadDefaults()
|
|||
mPreviewLocation = static_cast<lcPreviewLocation>(lcGetProfileInt(LC_PROFILE_PREVIEW_LOCATION));
|
||||
mPreviewPosition = static_cast<lcPreviewPosition>(lcGetProfileInt(LC_PROFILE_PREVIEW_POSITION));
|
||||
mDrawPreviewAxis = lcGetProfileInt(LC_PROFILE_PREVIEW_DRAW_AXES);
|
||||
mDrawPreviewViewSphere = lcGetProfileInt(LC_PROFILE_PREVIEW_DRAW_VIEW_SPHERE);
|
||||
}
|
||||
|
||||
void lcPreferences::SaveDefaults()
|
||||
|
@ -107,7 +106,6 @@ void lcPreferences::SaveDefaults()
|
|||
lcSetProfileInt(LC_PROFILE_PREVIEW_LOCATION, static_cast<int>(mPreviewLocation));
|
||||
lcSetProfileInt(LC_PROFILE_PREVIEW_POSITION, static_cast<int>(mPreviewPosition));
|
||||
lcSetProfileInt(LC_PROFILE_PREVIEW_DRAW_AXES, mDrawPreviewAxis);
|
||||
lcSetProfileInt(LC_PROFILE_PREVIEW_DRAW_VIEW_SPHERE, mDrawPreviewViewSphere);
|
||||
}
|
||||
|
||||
void lcPreferences::SetInterfaceColors(lcColorTheme ColorTheme)
|
||||
|
|
|
@ -86,7 +86,6 @@ public:
|
|||
lcPreviewPosition mPreviewPosition;
|
||||
int mPreviewSize;
|
||||
int mDrawPreviewAxis;
|
||||
int mDrawPreviewViewSphere;
|
||||
};
|
||||
|
||||
class lcApplication : public QApplication
|
||||
|
|
|
@ -844,8 +844,9 @@ void lcMainWindow::TogglePreviewWidget(bool Visible)
|
|||
|
||||
void lcMainWindow::EnableWindowFlags(bool Detached)
|
||||
{
|
||||
if (Detached) {
|
||||
QDockWidget *DockWidget = qobject_cast<QDockWidget *>(sender());
|
||||
if (Detached)
|
||||
{
|
||||
QDockWidget* DockWidget = qobject_cast<QDockWidget*>(sender());
|
||||
DockWidget->setWindowFlags(Qt::CustomizeWindowHint |
|
||||
Qt::Window |
|
||||
Qt::WindowMinimizeButtonHint |
|
||||
|
@ -2181,12 +2182,12 @@ void lcMainWindow::UpdateUndoRedo(const QString& UndoText, const QString& RedoTe
|
|||
|
||||
void lcMainWindow::ViewFocusReceived()
|
||||
{
|
||||
SetActiveView(dynamic_cast<lcView*>(sender()));
|
||||
SetActiveView(qobject_cast<lcView*>(sender()));
|
||||
}
|
||||
|
||||
void lcMainWindow::ViewCameraChanged()
|
||||
{
|
||||
lcView* View = dynamic_cast<lcView*>(sender());
|
||||
lcView* View = qobject_cast<lcView*>(sender());
|
||||
|
||||
if (!View || !View->IsLastFocused())
|
||||
return;
|
||||
|
|
|
@ -139,7 +139,6 @@ static lcProfileEntry gProfileEntries[LC_NUM_PROFILE_KEYS] =
|
|||
lcProfileEntry("Settings", "PreviewLocation", (int)lcPreviewLocation::BottomRight), // LC_PROFILE_PREVIEW_LOCATION
|
||||
lcProfileEntry("Settings", "PreviewPosition", (int)lcPreviewPosition::Dockable), // LC_PROFILE_PREVIEW_POSITION
|
||||
lcProfileEntry("Settings", "DrawPreviewAxis", 0), // LC_PROFILE_PREVIEW_DRAW_AXES
|
||||
lcProfileEntry("Settings", "DrawPreviewViewSphere",1) // LC_PROFILE_PREVIEW_DRAW_VIEW_SPHERE
|
||||
};
|
||||
|
||||
void lcRemoveProfileKey(LC_PROFILE_KEY Key)
|
||||
|
|
|
@ -88,7 +88,6 @@ enum LC_PROFILE_KEY
|
|||
LC_PROFILE_PREVIEW_LOCATION,
|
||||
LC_PROFILE_PREVIEW_POSITION,
|
||||
LC_PROFILE_PREVIEW_DRAW_AXES,
|
||||
LC_PROFILE_PREVIEW_DRAW_VIEW_SPHERE,
|
||||
|
||||
LC_NUM_PROFILE_KEYS
|
||||
};
|
||||
|
|
|
@ -134,7 +134,7 @@ lcQPreferencesDialog::lcQPreferencesDialog(QWidget* Parent, lcPreferencesDialogO
|
|||
|
||||
ui->PreviewAxisIconCheckBox->setChecked(mOptions->Preferences.mDrawPreviewAxis);
|
||||
|
||||
ui->PreviewViewSphereCheckBox->setChecked(mOptions->Preferences.mDrawPreviewViewSphere);
|
||||
ui->PreviewViewSphereCheckBox->setChecked(mOptions->Preferences.mPreviewViewSphereEnabled);
|
||||
|
||||
ui->PreviewLocationCombo->setCurrentIndex((int)mOptions->Preferences.mPreviewLocation);
|
||||
|
||||
|
@ -361,8 +361,6 @@ void lcQPreferencesDialog::accept()
|
|||
|
||||
mOptions->Preferences.mDrawPreviewAxis = ui->PreviewAxisIconCheckBox->isChecked();
|
||||
|
||||
mOptions->Preferences.mDrawPreviewViewSphere = ui->PreviewViewSphereCheckBox->isChecked();
|
||||
|
||||
mOptions->Preferences.mPreviewLocation = (lcPreviewLocation)ui->PreviewLocationCombo->currentIndex();
|
||||
|
||||
mOptions->Preferences.mPreviewPosition = (lcPreviewPosition)ui->PreviewPositionCombo->currentIndex();
|
||||
|
@ -397,6 +395,8 @@ void lcQPreferencesDialog::accept()
|
|||
break;
|
||||
}
|
||||
|
||||
mOptions->Preferences.mPreviewViewSphereEnabled = ui->PreviewViewSphereCheckBox->isChecked();
|
||||
|
||||
QDialog::accept();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue