Commit 0b840ec2 authored by Jan Möbius's avatar Jan Möbius
Browse files

Add Icon in datacontrol submenu

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@10100 383ad7c9-94d9-4d36-a494-682f7c89f535
parent f18e0eb7
...@@ -286,13 +286,17 @@ void DataControlPlugin::slotCustomContextMenuRequested ( const QPoint & _pos ) { ...@@ -286,13 +286,17 @@ void DataControlPlugin::slotCustomContextMenuRequested ( const QPoint & _pos ) {
icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"datacontrol-delete-item.png"); icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"datacontrol-delete-item.png");
action->setIcon(icon); action->setIcon(icon);
} else { } else {
//show object name and id in first entry of the menu
int id = model_->itemId( indexList[0] ); //show object name and id in first entry of the menu
BaseObject* item = 0; int id = model_->itemId( indexList[0] );
if ( id != -1 && PluginFunctions::getObject(id,item) ) BaseObject* item = 0;
menu.addAction(tr("Object ")+QString::number(id)+": "+item->name()); if ( id != -1 && PluginFunctions::getObject(id,item) ) {
menu.addSeparator(); QAction* header = menu.addAction(tr("Object ")+QString::number(id)+": "+item->name());
header->setIcon( typeIcon(item->dataType()) );
}
menu.addSeparator();
if(item->dataType() == DATA_LIGHT) { if(item->dataType() == DATA_LIGHT) {
action = menu.addAction(tr("Copy"),this,SLOT ( slotCopy() )); action = menu.addAction(tr("Copy"),this,SLOT ( slotCopy() ));
icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"edit-copy.png"); icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"edit-copy.png");
......
Supports Markdown
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