From: nds Date: Mon, 15 Feb 2016 11:23:40 +0000 (+0300) Subject: Overconstraint situation: redisplay objects through the events loop. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ecc5ccd6a2bbfb72ed59725126237197f2efec13;p=modules%2Fshaper.git Overconstraint situation: redisplay objects through the events loop. --- diff --git a/src/PartSet/PartSet_OverconstraintListener.cpp b/src/PartSet/PartSet_OverconstraintListener.cpp index 435ceca00..52d84913e 100755 --- a/src/PartSet/PartSet_OverconstraintListener.cpp +++ b/src/PartSet/PartSet_OverconstraintListener.cpp @@ -148,33 +148,16 @@ bool PartSet_OverconstraintListener::repairConflictingObjects( void PartSet_OverconstraintListener::redisplayObjects( const std::set& theObjects) { -/*static Events_Loop* aLoop = Events_Loop::loop(); - static Events_ID EVENT_DISP = aLoop->eventByName(EVENT_OBJECT_UPDATED); + static Events_Loop* aLoop = Events_Loop::loop(); + static Events_ID EVENT_DISP = aLoop->eventByName(EVENT_OBJECT_TO_REDISPLAY); static const ModelAPI_EventCreator* aECreator = ModelAPI_EventCreator::get(); std::set::const_iterator anIt = theObjects.begin(), aLast = theObjects.end(); - for (; anIt != aLast; anIt++) { + for (; anIt != aLast; anIt++) aECreator->sendUpdated(*anIt, EVENT_DISP); - //#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(); - bool aHidden; - std::set::const_iterator anIt = theObjects.begin(), aLast = theObjects.end(); - for (; anIt != aLast; anIt++) { - ObjectPtr anObject = *anIt; - aHidden = !anObject->data() || !anObject->data()->isValid() || - anObject->isDisabled() || (!anObject->isDisplayed()); - if (!aHidden) - aDisplayer->redisplay(anObject, false); - } - aDisplayer->updateViewer(); + aLoop->flush(EVENT_DISP); } XGUI_Workshop* PartSet_OverconstraintListener::workshop() const