Commit c7c7a767 authored by Marlin Frickenschmidt's avatar Marlin Frickenschmidt
Browse files

Added Object name and ID display to Datacontrol popup menu

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@10090 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 7a004117
......@@ -286,6 +286,12 @@ void DataControlPlugin::slotCustomContextMenuRequested ( const QPoint & _pos ) {
icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"datacontrol-delete-item.png");
action->setIcon(icon);
} else {
//show object name and id in first entry of the menu
int id = model_->itemId( indexList[0] );
BaseObject* item = 0;
if ( id != -1 && PluginFunctions::getObject(id,item) )
menu.addAction(tr("Object ")+QString::number(id)+": "+item->name());
if(item->dataType() == DATA_LIGHT) {
action = menu.addAction(tr("Copy"),this,SLOT ( slotCopy() ));
icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"edit-copy.png");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment