diff --git a/Popup.cc b/Popup.cc index 352ea0d11e32d6c6cedc201c9c47efd8e02f22eb..5961784d842b0b9a07791654a703ef699a0ea324 100644 --- a/Popup.cc +++ b/Popup.cc @@ -182,7 +182,7 @@ void DataControlPlugin::slotCustomContextMenuRequested ( const QPoint & _pos ) { if (!popupIndex_.isValid()) return; - TreeItem* item = model_->getItem(popupIndex_); + TreeItem* treeItem = model_->getItem(popupIndex_); QItemSelectionModel* selection = view_->selectionModel(); @@ -203,7 +203,7 @@ void DataControlPlugin::slotCustomContextMenuRequested ( const QPoint & _pos ) { menu.addAction(tr("Remove"),this,SLOT ( slotPopupRemove() )); }else // check if the item is a group item - if ( item->isGroup() ) { + if ( treeItem->isGroup() ) { action = menu.addAction(tr("Zoom to objects"),this,SLOT ( slotZoomTo() )); icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"zoom-in.png"); action->setIcon(icon); @@ -220,15 +220,15 @@ void DataControlPlugin::slotCustomContextMenuRequested ( const QPoint & _pos ) { //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()) ); + BaseObject* curentObject = 0; + if ( id != -1 && PluginFunctions::getObject(id,curentObject) ) { + QAction* header = menu.addAction(tr("Object ")+QString::number(id)+": "+curentObject->name()); + header->setIcon( typeIcon(curentObject->dataType()) ); } menu.addSeparator(); - if(item->dataType() == DATA_LIGHT) { + if(curentObject->dataType() == DATA_LIGHT) { action = menu.addAction(tr("Copy"),this,SLOT ( slotCopy() )); icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"edit-copy.png"); action->setIcon(icon); @@ -241,7 +241,7 @@ void DataControlPlugin::slotCustomContextMenuRequested ( const QPoint & _pos ) { menu.addSeparator(); LightObject* light = 0; - if ( item->id() != -1 && PluginFunctions::getObject( item->id(), light ) ) { + if ( curentObject->id() != -1 && PluginFunctions::getObject( curentObject->id(), light ) ) { if (light != 0 && !light->lightSource()->enabled()) { action = menu.addAction(tr("Switch On"),this,SLOT ( slotSwitchLight() ));