]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1496: The elements in the main object or in the tool object are not displayed
authornds <nds@opencascade.com>
Thu, 19 May 2016 16:04:16 +0000 (19:04 +0300)
committernds <nds@opencascade.com>
Thu, 19 May 2016 16:04:16 +0000 (19:04 +0300)
Issue #1488: Select wire when Create face
Workaround until we get fix for: 0027523: Selection owner contains obsolete shape

src/XGUI/XGUI_Displayer.cpp

index be653fd0ed79c101ac0b2f83efcca3891804a2fe..bc1bb7526ef53b8c8cd54e6cef675f5ec8adc8a3 100644 (file)
@@ -76,6 +76,8 @@ const int MOUSE_SENSITIVITY_IN_PIXEL = 10;  ///< defines the local context mouse
 
 //#define DEBUG_OCCT_SHAPE_SELECTION
 
+#define WORKAROUND_UNTIL_27523_IS_FIXED
+
 void displayedObjects(const Handle(AIS_InteractiveContext)& theAIS, AIS_ListOfInteractive& theList)
 {
   // Get from null point
@@ -332,8 +334,18 @@ bool XGUI_Displayer::redisplay(ObjectPtr theObject, bool theUpdateViewer)
       if (aNeedToRestoreSelection)
         myWorkshop->module()->storeSelection();
 
+#ifdef WORKAROUND_UNTIL_27523_IS_FIXED
+      if (!myActiveSelectionModes.contains(0))
+        aContext->Activate(aAISIO, 0);
+#endif
+
       aContext->Redisplay(aAISIO, false);
 
+#ifdef WORKAROUND_UNTIL_27523_IS_FIXED
+      if (!myActiveSelectionModes.contains(0))
+        aContext->Deactivate(aAISIO, 0);
+#endif
+
       if (aNeedToRestoreSelection)
         myWorkshop->module()->restoreSelection();