Sketcher: New setting: Show advanced solver taskbox
=================================================== I makes the advanced solver taskbox by default disabled (not shown) and provides a setting in Preferences->Display->Sketcher to enable it.
This commit is contained in:
parent
796c9d79d4
commit
bae32f74bb
|
@ -116,6 +116,7 @@ void SketcherSettings::saveSettings()
|
|||
ui->EditSketcherFontSize->onSave();
|
||||
ui->dialogOnDistanceConstraint->onSave();
|
||||
ui->continueMode->onSave();
|
||||
ui->checkBoxAdvancedSolverTaskBox->onSave();
|
||||
form->saveSettings();
|
||||
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Part");
|
||||
|
@ -149,6 +150,7 @@ void SketcherSettings::loadSettings()
|
|||
ui->EditSketcherFontSize->onRestore();
|
||||
ui->dialogOnDistanceConstraint->onRestore();
|
||||
ui->continueMode->onRestore();
|
||||
ui->checkBoxAdvancedSolverTaskBox->onRestore();
|
||||
form->loadSettings();
|
||||
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Part");
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>404</width>
|
||||
<height>680</height>
|
||||
<height>744</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -40,7 +40,7 @@
|
|||
<property name="toolTip">
|
||||
<string>The color of edges being edited</string>
|
||||
</property>
|
||||
<property name="color">
|
||||
<property name="color" stdset="0">
|
||||
<color>
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
|
@ -73,7 +73,7 @@
|
|||
<property name="toolTip">
|
||||
<string>The color of vertices being edited</string>
|
||||
</property>
|
||||
<property name="color">
|
||||
<property name="color" stdset="0">
|
||||
<color>
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
|
@ -106,7 +106,7 @@
|
|||
<property name="toolTip">
|
||||
<string>The color of edges being edited</string>
|
||||
</property>
|
||||
<property name="color">
|
||||
<property name="color" stdset="0">
|
||||
<color>
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
|
@ -139,7 +139,7 @@
|
|||
<property name="toolTip">
|
||||
<string>The color of vertices being edited</string>
|
||||
</property>
|
||||
<property name="color">
|
||||
<property name="color" stdset="0">
|
||||
<color>
|
||||
<red>255</red>
|
||||
<green>38</green>
|
||||
|
@ -172,7 +172,7 @@
|
|||
<property name="toolTip">
|
||||
<string>The color of fully constrained geometry in edit mode</string>
|
||||
</property>
|
||||
<property name="color">
|
||||
<property name="color" stdset="0">
|
||||
<color>
|
||||
<red>255</red>
|
||||
<green>38</green>
|
||||
|
@ -192,7 +192,7 @@
|
|||
<property name="toolTip">
|
||||
<string>The color of construction geometry in edit mode</string>
|
||||
</property>
|
||||
<property name="color">
|
||||
<property name="color" stdset="0">
|
||||
<color>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
|
@ -225,7 +225,7 @@
|
|||
<property name="toolTip">
|
||||
<string>The color of external geometry in edit mode</string>
|
||||
</property>
|
||||
<property name="color">
|
||||
<property name="color" stdset="0">
|
||||
<color>
|
||||
<red>204</red>
|
||||
<green>51</green>
|
||||
|
@ -271,7 +271,7 @@
|
|||
<property name="toolTip">
|
||||
<string>The color of fully constrained geometry in edit mode</string>
|
||||
</property>
|
||||
<property name="color">
|
||||
<property name="color" stdset="0">
|
||||
<color>
|
||||
<red>0</red>
|
||||
<green>255</green>
|
||||
|
@ -397,7 +397,7 @@
|
|||
</item>
|
||||
<item row="13" column="1">
|
||||
<widget class="Gui::PrefColorButton" name="CursorTextColor">
|
||||
<property name="color">
|
||||
<property name="color" stdset="0">
|
||||
<color>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
|
@ -446,7 +446,7 @@
|
|||
<property name="toolTip">
|
||||
<string>The color of driving constraints in edit mode</string>
|
||||
</property>
|
||||
<property name="color">
|
||||
<property name="color" stdset="0">
|
||||
<color>
|
||||
<red>255</red>
|
||||
<green>38</green>
|
||||
|
@ -466,7 +466,7 @@
|
|||
<property name="toolTip">
|
||||
<string>The color of non-driving constrains or dimensions in edit mode</string>
|
||||
</property>
|
||||
<property name="color">
|
||||
<property name="color" stdset="0">
|
||||
<color>
|
||||
<red>0</red>
|
||||
<green>38</green>
|
||||
|
@ -584,7 +584,29 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<item row="3" column="0">
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>Sketch Solver</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="0" column="0">
|
||||
<widget class="Gui::PrefCheckBox" name="checkBoxAdvancedSolverTaskBox">
|
||||
<property name="text">
|
||||
<string>Show Advanced Solver Control in the Task bar</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>ShowSolverAdvancedWidget</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Sketcher</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
|
|
|
@ -49,22 +49,28 @@ TaskDlgEditSketch::TaskDlgEditSketch(ViewProviderSketch *sketchView)
|
|||
Messages = new TaskSketcherMessages(sketchView);
|
||||
SolverAdvanced = new TaskSketcherSolverAdvanced(sketchView);
|
||||
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher");
|
||||
|
||||
Content.push_back(Messages);
|
||||
Content.push_back(SolverAdvanced);
|
||||
|
||||
if( hGrp->GetBool("ShowSolverAdvancedWidget",false)) {
|
||||
Content.push_back(SolverAdvanced);
|
||||
}
|
||||
|
||||
Content.push_back(General);
|
||||
Content.push_back(Constraints);
|
||||
Content.push_back(Elements);
|
||||
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher");
|
||||
if( !hGrp->GetBool("ShowMessagesWidget",true))
|
||||
|
||||
if( !hGrp->GetBool("ExpandedMessagesWidget",true))
|
||||
Messages->hideGroupBox();
|
||||
if( !hGrp->GetBool("ShowSolverAdvancedWidget",false))
|
||||
SolverAdvanced->hideGroupBox();
|
||||
if( !hGrp->GetBool("ShowEditControlWidget",false))
|
||||
if( !hGrp->GetBool("ExpandedSolverAdvancedWidget",false))
|
||||
SolverAdvanced->hideGroupBox();
|
||||
if( !hGrp->GetBool("ExpandedEditControlWidget",false))
|
||||
General->hideGroupBox();
|
||||
if( !hGrp->GetBool("ShowConstraintsWidget",true))
|
||||
if( !hGrp->GetBool("ExpandedConstraintsWidget",true))
|
||||
Constraints->hideGroupBox();
|
||||
if( !hGrp->GetBool("ShowElementsWidget",true))
|
||||
if( !hGrp->GetBool("ExpandedElementsWidget",true))
|
||||
Elements->hideGroupBox();
|
||||
|
||||
App::Document* document = sketchView->getObject()->getDocument();
|
||||
|
@ -111,11 +117,11 @@ bool TaskDlgEditSketch::accept()
|
|||
bool TaskDlgEditSketch::reject()
|
||||
{
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher");
|
||||
hGrp->SetBool("ShowMessagesWidget",Messages->isGroupVisible());
|
||||
hGrp->SetBool("ShowSolverAdvancedWidget",SolverAdvanced->isGroupVisible());
|
||||
hGrp->SetBool("ShowEditControlWidget",General->isGroupVisible());
|
||||
hGrp->SetBool("ShowConstraintsWidget",Constraints->isGroupVisible());
|
||||
hGrp->SetBool("ShowElementsWidget",Elements->isGroupVisible());
|
||||
hGrp->SetBool("ExpandedMessagesWidget",Messages->isGroupVisible());
|
||||
hGrp->SetBool("ExpandedSolverAdvancedWidget",SolverAdvanced->isGroupVisible());
|
||||
hGrp->SetBool("ExpandedEditControlWidget",General->isGroupVisible());
|
||||
hGrp->SetBool("ExpandedConstraintsWidget",Constraints->isGroupVisible());
|
||||
hGrp->SetBool("ExpandedElementsWidget",Elements->isGroupVisible());
|
||||
|
||||
std::string document = getDocumentName(); // needed because resetEdit() deletes this instance
|
||||
Gui::Command::doCommand(Gui::Command::Gui,"Gui.getDocument('%s').resetEdit()", document.c_str());
|
||||
|
|
Loading…
Reference in New Issue
Block a user