Commit 9c2e23c6 authored by Jan Möbius's avatar Jan Möbius

Add Icon in datacontrol submenu

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@10100 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 7478dd9a
......@@ -286,13 +286,17 @@ 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());
menu.addSeparator();
//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) ) {
QAction* header = menu.addAction(tr("Object ")+QString::number(id)+": "+item->name());
header->setIcon( typeIcon(item->dataType()) );
}
menu.addSeparator();
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