From: vsv Date: Mon, 16 Nov 2015 08:47:48 +0000 (+0300) Subject: Issue #1086: Update arrows size on set view projection X-Git-Tag: V_2.0.0_alfa2~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=547568321f6f46b9f60715312a33809dcff37c90;p=modules%2Fshaper.git Issue #1086: Update arrows size on set view projection --- diff --git a/src/NewGeom/NewGeom_SalomeViewer.cpp b/src/NewGeom/NewGeom_SalomeViewer.cpp index ebdff9249..e91e09219 100644 --- a/src/NewGeom/NewGeom_SalomeViewer.cpp +++ b/src/NewGeom/NewGeom_SalomeViewer.cpp @@ -309,7 +309,7 @@ void NewGeom_SalomeViewer::setViewProjection(double theX, double theY, double th if (!aView3d.IsNull()) { aView3d->SetProj(theX, theY, theZ); aView3d->SetTwist( theTwist ); - aView3d->FitAll(0.01, true); + aView3d->FitAll(0.01, false); aView3d->SetZSize(0.); if (aView3d->Depth() < 0.1) aView3d->DepthFitAll(); diff --git a/src/PartSet/PartSet_WidgetSketchLabel.cpp b/src/PartSet/PartSet_WidgetSketchLabel.cpp index ff3808fb4..0c2dc8e88 100644 --- a/src/PartSet/PartSet_WidgetSketchLabel.cpp +++ b/src/PartSet/PartSet_WidgetSketchLabel.cpp @@ -6,6 +6,7 @@ #include "PartSet_WidgetSketchLabel.h" #include "PartSet_Tools.h" +#include "PartSet_Module.h" #include "SketchPlugin_SketchEntity.h" @@ -195,8 +196,12 @@ void PartSet_WidgetSketchLabel::updateByPlaneSelected(const ModuleBase_ViewerPrs // Rotate view if the sketcher plane is selected only from preview planes // Preview planes are created only if there is no any shape bool aRotate = Config_PropManager::boolean("Sketch planes", "rotate_to_plane", "false"); - if (aRotate) + if (aRotate) { myWorkshop->viewer()->setViewProjection(aXYZ.X(), aXYZ.Y(), aXYZ.Z(), aTwist); + PartSet_Module* aModule = dynamic_cast(myWorkshop->module()); + if (aModule) + aModule->onViewTransformed(); + } } // 3. Clear text in the label myStackWidget->setCurrentIndex(1); @@ -487,5 +492,8 @@ void PartSet_WidgetSketchLabel::onSetPlaneView() if (myViewInverted->isChecked()) aDir.Reverse(); myWorkshop->viewer()->setViewProjection(aDir.X(), aDir.Y(), aDir.Z(), 0.); + PartSet_Module* aModule = dynamic_cast(myWorkshop->module()); + if (aModule) + aModule->onViewTransformed(); } } diff --git a/src/XGUI/XGUI_ViewerProxy.cpp b/src/XGUI/XGUI_ViewerProxy.cpp index 90178a967..053a87abe 100644 --- a/src/XGUI/XGUI_ViewerProxy.cpp +++ b/src/XGUI/XGUI_ViewerProxy.cpp @@ -58,7 +58,7 @@ void XGUI_ViewerProxy::setViewProjection(double theX, double theY, double theZ, if (!aView3d.IsNull()) { aView3d->SetProj(theX, theY, theZ); aView3d->SetTwist( theTwist ); - aView3d->FitAll(0.01, true); + aView3d->FitAll(0.01, false); aView3d->SetZSize(0.); if (aView3d->Depth() < 0.1) aView3d->DepthFitAll();