Part: [skip ci] use the right value from the user settings to set point size

This commit is contained in:
wmayer
2020-02-08 11:07:06 +01:00
parent c3eb6d9001
commit 5abb3e57c2
4 changed files with 7 additions and 5 deletions

View File

@@ -56,6 +56,7 @@ public:
FC_VIEW_PARAM(DefaultShapeLineColor,unsigned long,Unsigned,421075455UL) \
FC_VIEW_PARAM(DefaultShapeColor,unsigned long,Unsigned,0xCCCCCC00) \
FC_VIEW_PARAM(DefaultShapeLineWidth,int,Int,2) \
FC_VIEW_PARAM(DefaultShapePointSize,int,Int,2) \
FC_VIEW_PARAM(CoinCycleCheck,bool,Bool,true) \
FC_VIEW_PARAM(EnablePropertyViewForInactiveDocument,bool,Bool,true) \
FC_VIEW_PARAM(ShowSelectionBoundingBox,bool,Bool,false) \

View File

@@ -62,7 +62,7 @@ void DlgSettingsObjectColor::saveSettings()
ui->DefaultShapeLineColor->onSave();
ui->DefaultShapeLineWidth->onSave();
ui->DefaultShapeVertexColor->onSave();
ui->DefaultShapeVertexWidth->onSave();
ui->DefaultShapeVertexSize->onSave();
ui->BoundingBoxColor->onSave();
// Annotations
ui->AnnotationTextColor->onSave();
@@ -76,7 +76,7 @@ void DlgSettingsObjectColor::loadSettings()
ui->DefaultShapeLineColor->onRestore();
ui->DefaultShapeLineWidth->onRestore();
ui->DefaultShapeVertexColor->onRestore();
ui->DefaultShapeVertexWidth->onRestore();
ui->DefaultShapeVertexSize->onRestore();
ui->BoundingBoxColor->onRestore();
// Annotations
ui->AnnotationTextColor->onRestore();

View File

@@ -124,7 +124,7 @@
</widget>
</item>
<item row="4" column="1">
<widget class="Gui::PrefSpinBox" name="DefaultShapeVertexWidth">
<widget class="Gui::PrefSpinBox" name="DefaultShapeVertexSize">
<property name="toolTip">
<string>The default size for new vertices</string>
</property>
@@ -138,7 +138,7 @@
<number>2</number>
</property>
<property name="prefEntry" stdset="0">
<cstring>DefaultShapeVertexWidth</cstring>
<cstring>DefaultShapePointSize</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>View</cstring>

View File

@@ -240,6 +240,7 @@ ViewProviderPartExt::ViewProviderPartExt()
float r,g,b;
r = ((lcol >> 24) & 0xff) / 255.0; g = ((lcol >> 16) & 0xff) / 255.0; b = ((lcol >> 8) & 0xff) / 255.0;
int lwidth = Gui::ViewParams::instance()->getDefaultShapeLineWidth();
int psize = Gui::ViewParams::instance()->getDefaultShapePointSize();
ParameterGrp::handle hPart = App::GetApplication().GetParameterGroupByPath
("User parameter:BaseApp/Preferences/Mod/Part");
@@ -268,7 +269,7 @@ ViewProviderPartExt::ViewProviderPartExt()
ADD_PROPERTY(LineWidth,(lwidth));
LineWidth.setConstraints(&sizeRange);
PointSize.setConstraints(&sizeRange);
ADD_PROPERTY(PointSize,(lwidth));
ADD_PROPERTY(PointSize,(psize));
ADD_PROPERTY(Deviation,(0.5f));
Deviation.setConstraints(&tessRange);
ADD_PROPERTY(AngularDeflection,(28.65));