const int MOUSE_SENSITIVITY_IN_PIXEL = 10; ///< defines the local context mouse selection sensitivity
-//#ifdef DEBUG_DISPLAY
+//#define DEBUG_DISPLAY
+//#define DEBUG_ACTIVATE
// Workaround for bug #25637
void displayedObjects(const Handle(AIS_InteractiveContext)& theAIS, AIS_ListOfInteractive& theList)
activateObjects(myActiveSelectionModes);
myWorkshop->selector()->setSelectedOwners(aSelectedOwners, false);
}
- }
+ else
+ activateObjects(myActiveSelectionModes);
+ }
if (isUpdateViewer)
updateViewer();
}
}
}
-void XGUI_Displayer::activate(ObjectPtr theFeature)
+/*void XGUI_Displayer::activate(ObjectPtr theFeature)
{
activate(theFeature, myActiveSelectionModes);
}
void XGUI_Displayer::activate(ObjectPtr theObject, const QIntList& theModes)
{
+#ifdef DEBUG_ACTIVATE
+ FeaturePtr aFeature = ModelAPI_Feature::feature(theObject);
+
+ if (aFeature.get() != NULL) {
+ QIntList aModes;
+ getModesOfActivation(theObject, aModes);
+
+
+ qDebug(QString("activate feature: %1, theModes: %2, myActiveSelectionModes: %3, getModesOf: %4").
+ arg(aFeature->data()->name().c_str()).
+ arg(theModes.size()).
+ arg(myActiveSelectionModes.size()).
+ arg(aModes.size()).toStdString().c_str());
+ }
+#endif
+
+
if (isVisible(theObject)) {
Handle(AIS_InteractiveContext) aContext = AISContext();
if (aContext.IsNull())
aContext->Activate(anAIS);
}
}
-}
+}*/
void XGUI_Displayer::getModesOfActivation(ObjectPtr theObject, QIntList& theModes)
{
void XGUI_Displayer::activateObjects(const QIntList& theModes)
{
+#ifdef DEBUG_ACTIVATE
+ qDebug(QString("activate all features: theModes: %2, myActiveSelectionModes: %3").
+ arg(theModes.size()).
+ arg(myActiveSelectionModes.size()).
+ toStdString().c_str());
+#endif
// In order to avoid doblications of selection modes
QIntList aNewModes;
foreach (int aMode, theModes) {
/// Activates the given object (it can be selected)
/// \param theObject object to activate
/// \param theModes - modes on which it has to be activated (can be empty)
- void activate(ObjectPtr theObject, const QIntList& theModes);
+ //void activate(ObjectPtr theObject, const QIntList& theModes);
/// Returns the modes of activation
/// \param theObject the feature or NULL if it not visualized
/// Activates the given object with default modes
/// \param theObject object to activate
- void activate(ObjectPtr theObject);
+ //void activate(ObjectPtr theObject);
/// Returns true if the given object can be selected
/// \param theObject object to check