From 9d196708b15d47b44e694c6cfe3ae2239666ecec Mon Sep 17 00:00:00 2001 From: jriegel Date: Thu, 12 Dec 2013 21:23:41 +0100 Subject: [PATCH] small fixes after merge from master --- src/Mod/PartDesign/Gui/ViewProviderDatum.cpp | 2 +- .../PartDesign/Gui/ViewProviderDatumLine.cpp | 4 ++-- .../PartDesign/Gui/ViewProviderDatumPlane.cpp | 20 +++++++++---------- .../PartDesign/Gui/ViewProviderDressUp.cpp | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/Mod/PartDesign/Gui/ViewProviderDatum.cpp b/src/Mod/PartDesign/Gui/ViewProviderDatum.cpp index 398bcc032..51dbddd66 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderDatum.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderDatum.cpp @@ -103,7 +103,7 @@ void ViewProviderDatum::attach(App::DocumentObject *obj) SoNormalBinding* normb = new SoNormalBinding(); normb->value = SoNormalBinding::PER_VERTEX_INDEXED; SoBaseColor* color = new SoBaseColor(); - color->rgb.setValue(0.9, 0.9, 0.3); + color->rgb.setValue(0.9f, 0.9f, 0.3f); SoSeparator* sep = new SoSeparator(); SoPickStyle* ps = new SoPickStyle(); ps->style = SoPickStyle::SHAPE; diff --git a/src/Mod/PartDesign/Gui/ViewProviderDatumLine.cpp b/src/Mod/PartDesign/Gui/ViewProviderDatumLine.cpp index fa0bd4931..010f0ea3b 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderDatumLine.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderDatumLine.cpp @@ -56,8 +56,8 @@ PROPERTY_SOURCE(PartDesignGui::ViewProviderDatumLine,PartDesignGui::ViewProvider ViewProviderDatumLine::ViewProviderDatumLine() { SoMaterial* material = new SoMaterial(); - material->diffuseColor.setValue(0.9f, 0.9f, 0.13); - material->transparency.setValue(0.2); + material->diffuseColor.setValue(0.9f, 0.9f, 0.13f); + material->transparency.setValue(0.2f); pShapeSep->addChild(material); } diff --git a/src/Mod/PartDesign/Gui/ViewProviderDatumPlane.cpp b/src/Mod/PartDesign/Gui/ViewProviderDatumPlane.cpp index 7305f6962..7cd18c95f 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderDatumPlane.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderDatumPlane.cpp @@ -57,8 +57,8 @@ PROPERTY_SOURCE(PartDesignGui::ViewProviderDatumPlane,PartDesignGui::ViewProvide ViewProviderDatumPlane::ViewProviderDatumPlane() { SoMaterial* material = new SoMaterial(); - material->diffuseColor.setValue(0.9f, 0.9f, 0.13); - material->transparency.setValue(0.2); + material->diffuseColor.setValue(0.9f, 0.9f, 0.13f); + material->transparency.setValue(0.2f); pShapeSep->addChild(material); } @@ -153,7 +153,7 @@ void ViewProviderDatumPlane::updateData(const App::Property* prop) // Sort by angles std::vector a(points.size()); - for (int i = 0; i < points.size() - 1; i++) { + for (unsigned int i = 0; i < points.size() - 1; i++) { if (longest == 0) a[i] = atan2(points[i].z - m.z, points[i].y - m.y); else if (longest == 1) @@ -161,7 +161,7 @@ void ViewProviderDatumPlane::updateData(const App::Property* prop) else a[i] = atan2(points[i].y - m.y, points[i].x - m.x); - for (int k = i+1; k < points.size(); k++) { + for (unsigned int k = i+1; k < points.size(); k++) { if (longest == 0) a[k] = atan2(points[k].z - m.z, points[k].y - m.y); else if (longest == 1) @@ -192,7 +192,7 @@ void ViewProviderDatumPlane::updateData(const App::Property* prop) return; coord = new SoCoordinate3(); coord->point.setNum(points.size()); - for (int p = 0; p < points.size(); p++) + for (unsigned int p = 0; p < points.size(); p++) coord->point.set1Value(p, points[p].x, points[p].y, points[p].z); pShapeSep->addChild(coord); @@ -206,7 +206,7 @@ void ViewProviderDatumPlane::updateData(const App::Property* prop) faceSet->coordIndex.set1Value(2, 2); faceSet->coordIndex.set1Value(3, SO_END_FACE_INDEX); // One more triangle for every extra polygon point - for (int p = 3; p < points.size(); p++) { + for (unsigned int p = 3; p < points.size(); p++) { faceSet->coordIndex.set1Value(4 + 4*(p-3), 0); faceSet->coordIndex.set1Value(4 + 4*(p-3) + 1, p-1); faceSet->coordIndex.set1Value(4 + 4*(p-3) + 2, p); @@ -216,7 +216,7 @@ void ViewProviderDatumPlane::updateData(const App::Property* prop) lineSet = new SoIndexedLineSet(); lineSet->coordIndex.setNum(points.size()+2); - for (int p = 0; p < points.size(); p++) + for (unsigned int p = 0; p < points.size(); p++) lineSet->coordIndex.set1Value(p, p); lineSet->coordIndex.set1Value(points.size(), 0); lineSet->coordIndex.set1Value(points.size()+1, SO_END_LINE_INDEX); @@ -224,7 +224,7 @@ void ViewProviderDatumPlane::updateData(const App::Property* prop) } else { coord = static_cast(pShapeSep->getChild(1)); coord->point.setNum(points.size()); - for (int p = 0; p < points.size(); p++) + for (unsigned int p = 0; p < points.size(); p++) coord->point.set1Value(p, points[p].x, points[p].y, points[p].z); faceSet = static_cast(pShapeSep->getChild(2)); faceSet->partIndex.setNum(1); // One face @@ -236,7 +236,7 @@ void ViewProviderDatumPlane::updateData(const App::Property* prop) faceSet->coordIndex.set1Value(2, 2); faceSet->coordIndex.set1Value(3, SO_END_FACE_INDEX); // One more triangle for every extra polygon point - for (int p = 3; p < points.size(); p++) { + for (unsigned int p = 3; p < points.size(); p++) { faceSet->coordIndex.set1Value(4 + 4*(p-3), 0); faceSet->coordIndex.set1Value(4 + 4*(p-3) + 1, p-1); faceSet->coordIndex.set1Value(4 + 4*(p-3) + 2, p); @@ -244,7 +244,7 @@ void ViewProviderDatumPlane::updateData(const App::Property* prop) } lineSet = static_cast(pShapeSep->getChild(3)); lineSet->coordIndex.setNum(points.size()+2); - for (int p = 0; p < points.size(); p++) + for (unsigned int p = 0; p < points.size(); p++) lineSet->coordIndex.set1Value(p, p); lineSet->coordIndex.set1Value(points.size(), 0); lineSet->coordIndex.set1Value(points.size()+1, SO_END_LINE_INDEX); diff --git a/src/Mod/PartDesign/Gui/ViewProviderDressUp.cpp b/src/Mod/PartDesign/Gui/ViewProviderDressUp.cpp index c55bac981..6b879bcd0 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderDressUp.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderDressUp.cpp @@ -111,7 +111,7 @@ void ViewProviderDressUp::highlightReferences(const bool on) for (std::vector::const_iterator f = SubVals.begin(); f != SubVals.end(); f++) { int idx = atoi(f->substr(4).c_str()) - 1; // TODO: Find a better colour - colors[idx] = App::Color(0.2,1,0.2); + colors[idx] = App::Color(0.2f,1.0f,0.2f); } vp->DiffuseColor.setValues(colors); } else {