Extended global marker size to be used for Sketcher
This commit is contained in:
@@ -109,10 +109,6 @@ void SketcherSettings::saveSettings()
|
||||
ui->checkBoxNotifyConstraintSubstitutions->onSave();
|
||||
form->saveSettings();
|
||||
|
||||
ParameterGrp::handle hViewGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View");
|
||||
int markerSize = ui->EditSketcherMarkerSize->itemData(ui->EditSketcherMarkerSize->currentIndex()).toInt();
|
||||
hViewGrp->SetInt("EditSketcherMarkerSize", markerSize);
|
||||
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Part");
|
||||
QVariant data = ui->comboBox->itemData(ui->comboBox->currentIndex());
|
||||
int pattern = data.toInt();
|
||||
@@ -136,16 +132,6 @@ void SketcherSettings::loadSettings()
|
||||
ui->checkBoxNotifyConstraintSubstitutions->onRestore();
|
||||
form->loadSettings();
|
||||
|
||||
std::list<int> sizes = Gui::Inventor::MarkerBitmaps::getSupportedSizes("CIRCLE_FILLED");
|
||||
for (std::list<int>::iterator it = sizes.begin(); it != sizes.end(); ++it)
|
||||
ui->EditSketcherMarkerSize->addItem(tr("%1 px").arg(*it), *it);
|
||||
ParameterGrp::handle hViewGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View");
|
||||
int markerSize = hViewGrp->GetInt("EditSketcherMarkerSize", 7);
|
||||
int markerIndex = ui->EditSketcherMarkerSize->findData(QVariant(markerSize));
|
||||
if (markerIndex < 0)
|
||||
markerIndex = 1;
|
||||
ui->EditSketcherMarkerSize->setCurrentIndex(markerIndex);
|
||||
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Part");
|
||||
int pattern = hGrp->GetInt("GridLinePattern", 0x0f0f);
|
||||
int index = ui->comboBox->findData(QVariant(pattern));
|
||||
|
||||
@@ -55,27 +55,14 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_marker">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>182</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Marker size</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="comboBox">
|
||||
<property name="currentIndex">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="Gui::PrefCheckBox" name="dialogOnDistanceConstraint">
|
||||
<property name="text">
|
||||
<string>Ask for value after creating a distance constraint</string>
|
||||
@@ -91,17 +78,14 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Grid line pattern</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="EditSketcherMarkerSize"/>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2">
|
||||
<item row="4" column="0" colspan="2">
|
||||
<widget class="Gui::PrefCheckBox" name="continueMode">
|
||||
<property name="text">
|
||||
<string>Geometry Creation "Continue Mode"</string>
|
||||
@@ -117,7 +101,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="2">
|
||||
<item row="5" column="0" colspan="2">
|
||||
<widget class="Gui::PrefCheckBox" name="constraintMode">
|
||||
<property name="text">
|
||||
<string>Constraint Creation "Continue Mode" (Experimental)</string>
|
||||
@@ -133,7 +117,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="2">
|
||||
<item row="6" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
@@ -280,7 +264,7 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0" colspan="2">
|
||||
<item row="7" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox_5">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
@@ -335,14 +319,14 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>Segments per geometry</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<item row="2" column="1">
|
||||
<widget class="Gui::PrefSpinBox" name="SegmentsPerGeometry">
|
||||
<property name="minimum">
|
||||
<number>50</number>
|
||||
@@ -424,7 +408,6 @@
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>EditSketcherFontSize</tabstop>
|
||||
<tabstop>EditSketcherMarkerSize</tabstop>
|
||||
<tabstop>comboBox</tabstop>
|
||||
<tabstop>dialogOnDistanceConstraint</tabstop>
|
||||
<tabstop>continueMode</tabstop>
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
#include <Gui/Application.h>
|
||||
#include <Gui/ViewProvider.h>
|
||||
#include <Gui/WaitCursor.h>
|
||||
#include <Gui/Inventor/MarkerBitmaps.h>
|
||||
|
||||
using namespace SketcherGui;
|
||||
using namespace Gui::TaskView;
|
||||
@@ -545,7 +546,7 @@ void SketcherValidation::showPoints(const std::vector<Base::Vector3d>& pts)
|
||||
SoBaseColor * markcol = new SoBaseColor();
|
||||
markcol->rgb.setValue(1.0f, 1.0f, 0.0f);
|
||||
SoMarkerSet* marker = new SoMarkerSet();
|
||||
marker->markerIndex=SoMarkerSet::PLUS_9_9;
|
||||
marker->markerIndex=Gui::Inventor::MarkerBitmaps::getMarkerIndex("PLUS", App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View")->GetInt("MarkerSize", 9));
|
||||
pointsep->addChild(markcol);
|
||||
pointsep->addChild(marker);
|
||||
|
||||
|
||||
@@ -5336,7 +5336,7 @@ bool ViewProviderSketch::setEdit(int ModNum)
|
||||
edit = new EditData();
|
||||
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View");
|
||||
edit->MarkerSize = hGrp->GetInt("EditSketcherMarkerSize", 7);
|
||||
edit->MarkerSize = hGrp->GetInt("MarkerSize", 7);
|
||||
|
||||
createEditInventorNodes();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user