From: vsv Date: Mon, 27 Apr 2015 09:44:12 +0000 (+0300) Subject: 1. Make count of copies in Translation/Rotation editable X-Git-Tag: V_1.2.0~180^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7ba97e37f1244579af58837742d5a8f69843b4b5;p=modules%2Fshaper.git 1. Make count of copies in Translation/Rotation editable 2. Make arrows in various view not bigger then acceptable --- diff --git a/src/PartSet/PartSet_Module.cpp b/src/PartSet/PartSet_Module.cpp index 110ac6e74..7ae10661d 100644 --- a/src/PartSet/PartSet_Module.cpp +++ b/src/PartSet/PartSet_Module.cpp @@ -560,14 +560,29 @@ void PartSet_Module::onViewTransformed(int theTrsfType) return; ModuleBase_IViewer* aViewer = myWorkshop->viewer(); - Handle(V3d_View) aView = aViewer->activeView(); + //Handle(V3d_View) aView = aViewer->activeView(); XGUI_ModuleConnector* aConnector = dynamic_cast(myWorkshop); XGUI_Workshop* aWorkshop = aConnector->workshop(); XGUI_Displayer* aDisplayer = aWorkshop->displayer(); - Handle(AIS_InteractiveContext) aContext = myWorkshop->viewer()->AISContext(); - - double aLen = aView->Convert(15); + Handle(AIS_InteractiveContext) aContext = aViewer->AISContext(); + + Handle(V3d_Viewer) aV3dViewer = aContext->CurrentViewer(); + Handle(V3d_View) aView; + double aScale = 0; + for (aV3dViewer->InitDefinedViews(); + aV3dViewer->MoreDefinedViews(); + aV3dViewer->NextDefinedViews()) { + Handle(V3d_View) aV = aV3dViewer->DefinedView(); + double aS = aV->Scale(); + if (aS > aScale) { + aScale = aS; + aView = aV; + } + } + if (aView.IsNull()) + return; + double aLen = aView->Convert(20); SketcherPrs_Tools::setArrowSize(aLen); bool isModified = false; diff --git a/src/SketchPlugin/plugin-Sketch.xml b/src/SketchPlugin/plugin-Sketch.xml index 0b8caf3c7..9e2021b9c 100644 --- a/src/SketchPlugin/plugin-Sketch.xml +++ b/src/SketchPlugin/plugin-Sketch.xml @@ -280,8 +280,7 @@ + default="1" min="1"> @@ -307,8 +306,7 @@ + default="1" min="1">