From 37fda9b44a116bcce3c8da86f834c923169db76f Mon Sep 17 00:00:00 2001 From: vsv Date: Tue, 1 Oct 2019 11:48:15 +0300 Subject: [PATCH] Call update of viewer on drawing of objects --- src/PartSet/PartSet_SketcherMgr.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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. -- 2.39.2