Sketcher: UI option to enable/disable the automatic redundant removal mechanism

This commit is contained in:
Abdullah Tahiri
2018-08-22 09:34:22 +02:00
committed by wmayer
parent 8505b0eff4
commit 2a6655e176
3 changed files with 28 additions and 1 deletions

View File

@@ -63,6 +63,7 @@ TaskSketcherMessages::TaskSketcherMessages(ViewProviderSketch *sketchView)
ui->labelConstrainStatus->setOpenExternalLinks(false);
ui->autoUpdate->onRestore();
ui->autoRemoveRedundants->onRestore();
if(ui->autoUpdate->isChecked())
sketchView->getSketchObject()->noRecomputes=false;
@@ -125,6 +126,12 @@ void TaskSketcherMessages::on_autoUpdate_stateChanged(int state)
}
}
void TaskSketcherMessages::on_autoRemoveRedundants_stateChanged(int state)
{
Q_UNUSED(state);
ui->autoRemoveRedundants->onSave();
}
void TaskSketcherMessages::on_manualUpdate_clicked(bool checked)
{
Q_UNUSED(checked);

View File

@@ -53,6 +53,7 @@ public:
private Q_SLOTS:
void on_labelConstrainStatus_linkActivated(const QString &);
void on_autoUpdate_stateChanged(int state);
void on_autoRemoveRedundants_stateChanged(int state);
void on_manualUpdate_clicked(bool checked);
protected:

View File

@@ -46,6 +46,25 @@
</property>
</widget>
</item>
<item>
<widget class="Gui::PrefCheckBox" name="autoRemoveRedundants">
<property name="toolTip">
<string>Automatically removes redundant constraints.</string>
</property>
<property name="text">
<string>Auto Remove Redundants</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
<property name="prefEntry" stdset="0">
<cstring>AutoRemoveRedundants</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/Sketcher</cstring>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
@@ -79,7 +98,7 @@
<cstring>Mod/Sketcher</cstring>
</property>
</widget>
</item>
</item>
<item>
<widget class="QPushButton" name="manualUpdate">
<property name="toolTip">