]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Issue 0021046: EDF 1610 GUI: To be able to change the width of the lines: small changes.
authorrnv <rnv@opencascade.com>
Tue, 14 Feb 2012 14:55:37 +0000 (14:55 +0000)
committerrnv <rnv@opencascade.com>
Tue, 14 Feb 2012 14:55:37 +0000 (14:55 +0000)
src/MeasureGUI/MeasureGUI_AngleDlg.cxx
src/MeasureGUI/MeasureGUI_DistanceDlg.cxx

index d628fa594d832bab3cb76603b2f956e7ce93fdbc..c473dd78d4a87c335242f31b17266bf543674e8f 100644 (file)
@@ -54,6 +54,9 @@
 #include <gce_MakePln.hxx>
 #include <Precision.hxx>
 #include <AIS.hxx>
+#include <AIS_Drawer.hxx>
+#include <Prs3d_AngleAspect.hxx>
+#include <Prs3d_LineAspect.hxx>
 
 // QT Includes
 #include <qlineedit.h>
@@ -379,7 +382,9 @@ SALOME_Prs* MeasureGUI_AngleDlg::buildPrs()
 
        SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
        int w = resMgr->integerValue("Geometry", "measures_line_width", 1);
-       anIO->SetWidth(w);
+  Handle(Prs3d_AngleAspect) asp = new Prs3d_AngleAspect();
+  asp->LineAspect()->SetWidth(w);
+       anIO->Attributes()->SetAngleAspect(asp);
 
         SOCC_Prs* aPrs =
           dynamic_cast<SOCC_Prs*>(((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->CreatePrs(0));
index 3b8bc2a13f218cc8b34db7a51815acb8194334cd..f3493ec0a198460e36ac556f3fec286319bdfd40 100644 (file)
@@ -45,6 +45,9 @@
 // OCCT Includes
 #include <Geom_Plane.hxx>
 #include <AIS_LengthDimension.hxx>
+#include <AIS_Drawer.hxx>
+#include <Prs3d_LengthAspect.hxx>
+#include <Prs3d_LineAspect.hxx>
 #include <BRepBuilderAPI_MakeEdge.hxx>
 #include <BRepBuilderAPI_MakeVertex.hxx>
 #include <gce_MakePln.hxx>
@@ -330,7 +333,9 @@ SALOME_Prs* MeasureGUI_DistanceDlg::buildPrs()
       
       SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
       int w = resMgr->integerValue("Geometry", "measures_line_width", 1);
-      anIO->SetWidth(w);
+      Handle(Prs3d_LengthAspect) asp = new Prs3d_LengthAspect();
+      asp->LineAspect()->SetWidth(w);
+      anIO->Attributes()->SetLengthAspect(asp);
 
       SOCC_Prs* aPrs = dynamic_cast<SOCC_Prs*>(((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->CreatePrs(0));