addAction("RENAME_CMD", aAction);
connect(aAction, SIGNAL(triggered(bool)), this, SLOT(onRename()));
- aAction = new QAction(QIcon(":pictures/move.png"), tr("Move down"), this);
+ aAction = new QAction(QIcon(":pictures/move.png"), tr("Move to the end"), this);
addAction("MOVE_CMD", aAction);
aAction = new QAction(QIcon(":pictures/color.png"), tr("Color..."), this);
Events_Loop* aLoop = Events_Loop::loop();
aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_CREATED));
aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_DELETED));
+ aLoop->registerListener(this, Events_Loop::eventByName(EVENT_ORDER_UPDATED));
aLoop->registerListener(this, Events_Loop::eventByName(EVENT_DOCUMENT_CHANGED));
}
#endif
}
}
+ } else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_ORDER_UPDATED)) {
+ std::shared_ptr<ModelAPI_ObjectUpdatedMessage> aUpdMsg =
+ std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
+ std::set<ObjectPtr> aObjects = aUpdMsg->objects();
+
+ std::set<ObjectPtr>::const_iterator aIt;
+ std::string aObjType;
+ for (aIt = aObjects.begin(); aIt != aObjects.end(); ++aIt) {
+ ObjectPtr aObject = (*aIt);
+ // We do not show objects which not has to be shown in object browser
+ if (!aObject->isInHistory())
+ continue;
+ QModelIndex aIndex = objectIndex(aObject);
+ QModelIndex aParent = parent(aIndex);
+ }
} else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_DOCUMENT_CHANGED)) {
DocumentPtr aDoc = ModelAPI_Session::get()->activeDocument();
if (aDoc != aRootDoc) {