From 1bc342a649713da2ab241c5b3aa2b8d2f7a43134 Mon Sep 17 00:00:00 2001 From: nds Date: Fri, 13 Nov 2015 19:49:53 +0300 Subject: [PATCH] VSA correction for selection problem in OCCT 6.9.1. --- src/XGUI/XGUI_Displayer.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/XGUI/XGUI_Displayer.cpp b/src/XGUI/XGUI_Displayer.cpp index 5e27a844a..35443aa1e 100644 --- a/src/XGUI/XGUI_Displayer.cpp +++ b/src/XGUI/XGUI_Displayer.cpp @@ -43,6 +43,7 @@ #include #include #include +#include #include @@ -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"); -- 2.39.2