#include <TColStd_IndexedMapOfInteger.hxx>
#include <NCollection_DataMap.hxx>
+#include <Basics_OCCTVersion.hxx>
using namespace HEXABLOCK::GUI;
return;
Handle(AIS_InteractiveContext) ic = vw->getAISContext();
-
+#if OCC_VERSION_LARGE <= 0x07030000
if (ic->HasOpenedContext())
{
+#endif
TopoDS_Shape curBigShape;
TopTools_IndexedMapOfShape subShapes;
for (ic->InitSelected(); ic->MoreSelected(); ic->NextSelected())
{
- Handle(StdSelect_BRepOwner) anOwner = Handle(StdSelect_BRepOwner)::DownCast(ic->SelectedOwner());
- if (anOwner.IsNull())
- continue;
-
- Handle(AIS_InteractiveObject) io = Handle(AIS_InteractiveObject)::DownCast(anOwner->Selectable());
+ Handle(AIS_InteractiveObject) io = Handle(AIS_InteractiveObject)::DownCast(ic->SelectedInteractive());
QString entryStr = entry(io);
int index = -1;
- if (anOwner->ComesFromDecomposition()) // == Local Selection
+ Handle(StdSelect_BRepOwner) anOwner = Handle(StdSelect_BRepOwner)::DownCast(ic->SelectedOwner());
+
+ if (!anOwner.IsNull() && anOwner->ComesFromDecomposition()) // == Local Selection
{
TopoDS_Shape subShape = anOwner->Shape();
Handle(AIS_Shape) aisShape = Handle(AIS_Shape)::DownCast(io);
aList.append(SUIT_DataOwnerPtr(owner));
}
}
+#if OCC_VERSION_LARGE <= 0x07030000
}
else
{
}
}
}
+#endif
// add externally selected objects
SUIT_DataOwnerPtrList::const_iterator anExtIter, itEnd;
if ( owner->State() )
continue;
- if ( ic->HasOpenedContext() )
+ if ( owner->ComesFromDecomposition() )
ic->AddOrRemoveSelected( owner, false );
else
ic->AddOrRemoveSelected( Handle(AIS_InteractiveObject)::DownCast(owner->Selectable()), false );
#include "HEXABLOCKGUI.hxx"
#include "HEXABLOCKGUI_VtkDocumentGraphicView.hxx"
+#include <Basics_OCCTVersion.hxx>
+
#include <SOCC_ViewModel.h>
#include <SUIT_ViewManager.h>
//get the context
Handle (AIS_InteractiveContext) anIC = getContext();
- if ( anIC.IsNull() || !anIC->HasOpenedContext() )
+ if ( anIC.IsNull()
+#if OCC_VERSION_LARGE <= 0x07030000
+ || !anIC->HasOpenedContext()
+#endif
+ )
return;
// ** highlight