From: vsv Date: Tue, 1 Oct 2019 08:48:15 +0000 (+0300) Subject: Call update of viewer on drawing of objects X-Git-Tag: V9_4_0a2~4^2~48 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=37fda9b44a116bcce3c8da86f834c923169db76f;p=modules%2Fshaper.git Call update of viewer on drawing of objects --- diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index 540436a78..69d6092e3 100644 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -538,6 +538,10 @@ void PartSet_SketcherMgr::onMouseMoved(ModuleBase_IViewWindow* theWnd, QMouseEve if (myModule->sketchReentranceMgr()->processMouseMoved(theWnd, theEvent)) return; + ModuleBase_IWorkshop* aWorkshop = myModule->workshop(); + XGUI_ModuleConnector* aConnector = dynamic_cast(aWorkshop); + XGUI_Displayer* aDisplayer = aConnector->workshop()->displayer(); + if (isNestedCreateOperation(getCurrentOperation(), activeSketch())) { #ifdef DRAGGING_DEBUG QTime t; @@ -562,6 +566,7 @@ void PartSet_SketcherMgr::onMouseMoved(ModuleBase_IViewWindow* theWnd, QMouseEve visualizeFeature(aFeature, aFOperation->isEditOperation(), canDisplayObject(aFeature)); } } + aDisplayer->updateViewer(); #ifdef DRAGGING_DEBUG cout << "Mouse move processing " << t.elapsed() << endl; #endif @@ -595,9 +600,6 @@ void PartSet_SketcherMgr::onMouseMoved(ModuleBase_IViewWindow* theWnd, QMouseEve std::shared_ptr aCurrentPosition = std::shared_ptr( new GeomAPI_Pnt2d(aMousePnt.myCurX, aMousePnt.myCurY)); - ModuleBase_IWorkshop* aWorkshop = myModule->workshop(); - XGUI_ModuleConnector* aConnector = dynamic_cast(aWorkshop); - XGUI_Displayer* aDisplayer = aConnector->workshop()->displayer(); // 3. the flag to disable the update viewer should be set in order to avoid blinking in the // viewer happens by deselect/select the modified objects. The flag should be restored after // the selection processing. The update viewer should be also called.