- //#ifdef DEBUG_FEATURE_OVERCONSTRAINT_LISTENER
- // QString anInfoStr = ModuleBase_Tools::objectInfo(*anIt);
- // qDebug(QString("PartSet_OverconstraintListener::SEND UPDATED: %1").arg(anInfoStr).toStdString().c_str());
- //#endif
- }
- aLoop->flush(EVENT_DISP);*/
-
- XGUI_Displayer* aDisplayer = workshop()->displayer();
- //QObjectPtrList aObjects = aDisplayer->displayedObjects();
- bool aHidden;
- std::set<ObjectPtr>::const_iterator anIt = theObjects.begin(), aLast = theObjects.end();
- for (; anIt != aLast; anIt++) {
- ObjectPtr anObject = *anIt;
- //foreach(ObjectPtr aObj, aObjects) {
- //TODO: replace by redisplay event.
- aHidden = !anObject->data() || !anObject->data()->isValid() ||
- anObject->isDisabled() || (!anObject->isDisplayed());
- if (!aHidden)
- aDisplayer->redisplay(anObject, false);
- }
- aDisplayer->updateViewer();
-}
-
-void PartSet_OverconstraintListener::setConflictingObject(const ObjectPtr& theObject,
- const bool theConflicting)
-{
- return;
-
- AISObjectPtr anAISObject;
- GeomPresentablePtr aPrs = std::dynamic_pointer_cast<GeomAPI_IPresentable>(theObject);
-
- if (aPrs.get() != NULL) {
- XGUI_Workshop* aWorkshop = workshop();
- XGUI_Displayer* aDisplayer = aWorkshop->displayer();
-
- anAISObject = aPrs->getAISObject(aDisplayer->getAISObject(theObject));
- if (anAISObject.get()) {
- Handle(AIS_InteractiveObject) anAISIO = anAISObject->impl<Handle(AIS_InteractiveObject)>();
- if (!anAISIO.IsNull()) {
- if (!Handle(SketcherPrs_SymbolPrs)::DownCast(anAISIO).IsNull()) {
- Handle(SketcherPrs_SymbolPrs) aPrs = Handle(SketcherPrs_SymbolPrs)::DownCast(anAISIO);
- //if (!aPrs.IsNull())
- // aPrs->setConflictingConstraint(theConflicting);
- }
- }
- }
- }