]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
VSA correction for selection problem in OCCT 6.9.1.
authornds <nds@opencascade.com>
Fri, 13 Nov 2015 16:49:53 +0000 (19:49 +0300)
committernds <nds@opencascade.com>
Fri, 13 Nov 2015 16:49:53 +0000 (19:49 +0300)
src/XGUI/XGUI_Displayer.cpp

index 5e27a844aa57b74752e591280874ab38477a941e..35443aa1eed3da8eb246f8d9eb725c131d31981e 100644 (file)
@@ -43,6 +43,7 @@
 #include <SelectMgr_ListIteratorOfListOfFilter.hxx>
 #include <Prs3d_Drawer.hxx>
 #include <Prs3d_IsoAspect.hxx>
+#include <SelectMgr_SelectionManager.hxx>
 
 #include <StdSelect_ViewerSelector3d.hxx>
 
@@ -56,6 +57,8 @@
 
 const int MOUSE_SENSITIVITY_IN_PIXEL = 10;  ///< defines the local context mouse selection sensitivity
 
+#define WORKAROUND_691
+
 //#define DEBUG_ACTIVATE_OBJECTS
 //#define DEBUG_DEACTIVATE
 //#define DEBUG_ACTIVATE_AIS
@@ -315,7 +318,15 @@ bool XGUI_Displayer::redisplay(ObjectPtr theObject, bool theUpdateViewer)
         arg(!isEqualShapes || isCustomized).arg(isEqualShapes).arg(isCustomized).toStdString().c_str());
     #endif
     if (!isEqualShapes || isCustomized) {
+#ifdef WORKAROUND_691
+      // this is a workaround for OCCT 6.9.1, selection area is wrong
+      // on sketch and 3D features
+      aContext->RecomputePrsOnly (aAISIO, false);
+      aContext->SelectionManager()->RecomputeSelection (aAISIO, true);
+      aContext->LocalContext()->ClearOutdatedSelection (aAISIO, false);
+#else
       aContext->Redisplay(aAISIO, false);
+#endif
       aRedisplayed = true;
       #ifdef DEBUG_FEATURE_REDISPLAY
         qDebug("  Redisplay happens");