#include <QHBoxLayout>
#include <QPixmap>
+#include <Basics_OCCTVersion.hxx>
+
//=================================================================================
// function : Constructor
// purpose :
anAISContext->ClearCurrents( Standard_False );
anAISContext->ClearSelected( Standard_False );
+#if OCC_VERSION_LARGE <= 0x07030000
anAISContext->OpenLocalContext( Standard_True, Standard_False );
-
+#endif
Handle(MeasureGUI_DimensionFilter) aFilter = new MeasureGUI_DimensionFilter( myEditObject->GetStudyEntry() );
anAISContext->AddFilter( aFilter );
* ------------------------------------------------ */
Handle(AIS_InteractiveContext) anAISContext = myOperatedViewer->getAISContext();
-
+#if OCC_VERSION_LARGE <= 0x07030000
anAISContext->CloseLocalContext();
+#else
+ anAISContext->Deactivate();
+ anAISContext->Activate(0);
+#endif
LightApp_SelectionMgr* aSelectionMgr = myGeomGUI->getApp()->selectionMgr();
anAISContext->InitSelected();
Handle(AIS_InteractiveObject) anAIS;
-
+#if OCC_VERSION_LARGE <= 0x07030000
if ( anAISContext->HasOpenedContext() )
{
Handle(SelectMgr_EntityOwner) anAISOwner = anAISContext->SelectedOwner();
}
else
{
+#endif
anAIS = anAISContext->Current();
+#if OCC_VERSION_LARGE <= 0x07030000
}
+#endif
int aDimensionId = IdFromPrs( anAIS );
{
return;
}
-
+#if OCC_VERSION_LARGE <= 0x07030000
Standard_Boolean isLocal = anAISContext->HasOpenedContext();
if ( isLocal )
{
}
else
{
+#endif
anAISContext->ClearCurrents( Standard_False );
+#if OCC_VERSION_LARGE <= 0x07030000
}
-
+#endif
SOCC_Prs* aPrs = dynamic_cast<SOCC_Prs*>( theViewer->CreatePrs( myEditObject->GetStudyEntry() ) );
AIS_ListOfInteractive aListOfIO;
const Handle(AIS_InteractiveObject)& anIO = anIt.Value();
if ( IdFromPrs( anIO ) != theId )
{
+#if OCC_VERSION_LARGE <= 0x07030000
if ( isLocal )
{
+#endif
anAISContext->Deactivate( anIO, AIS_DSM_Line );
anAISContext->Deactivate( anIO, AIS_DSM_Text );
}
continue;
+#if OCC_VERSION_LARGE <= 0x07030000
}
if ( isLocal )
{
+#endif
anAISContext->AddOrRemoveSelected( anIO, Standard_False );
anAISContext->Activate( anIO, AIS_DSM_Line );
anAISContext->Activate( anIO, AIS_DSM_Text );
+#if OCC_VERSION_LARGE <= 0x07030000
}
else
{
+#endif
anAISContext->AddOrRemoveCurrentObject( anIO, Standard_False );
+#if OCC_VERSION_LARGE <= 0x07030000
}
+#endif
anAISContext->UpdateCurrentViewer();
}