foreach ( const int anId, anObsoleteIds ) {
myViewManagerMap.remove( anId );
myObjectStateMap.remove( anId );
+ myObjectDisplayOrderMap.remove( anId );
myShapesMap.remove( anId );
myVTKPrsMap.remove( anId );
}
ObjectState& anObjectState = aEntry2ObjectStateMap[ anEntry ];
anObjectState.Visibility = theState;
+
+ // Remember the display order ( needed for Z layers assignment only )
+ QStringList& anObjectEntries = myObjectDisplayOrderMap[ theViewId ];
+ anObjectEntries.removeAll( anEntry );
+ if ( theState ) {
+ anObjectEntries.append( anEntry );
+ }
}
}
aDesktop->statusBar()->showMessage( tr("COORDINATES_INFO").arg( aX ).arg( anY ) );
}
}
+}
+
+/**
+ * Get the object display order. Needed for Z layers assignment only.
+ */
+int HYDROGUI_Module::getObjectDisplayOrder(
+ const int theViewId, const Handle(HYDROData_Entity)& theObject) const
+{
+ if( theObject.IsNull() )
+ return -1;
+
+ QString anEntry = HYDROGUI_DataObject::dataObjectEntry( theObject );
+ QStringList anObjectEntries = myObjectDisplayOrderMap.value( theViewId );
+
+ return anObjectEntries.indexOf( anEntry );
}
\ No newline at end of file