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

Hide Pick Menu if not containing any modes

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@5115 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 4d02be5e
...@@ -113,8 +113,10 @@ void CoreWidget::updatePopupMenu(const QPoint& _point, unsigned int _examinerId) ...@@ -113,8 +113,10 @@ void CoreWidget::updatePopupMenu(const QPoint& _point, unsigned int _examinerId)
if ( node == 0 ) if ( node == 0 )
std::cerr << "Node not found" << std::endl; std::cerr << "Node not found" << std::endl;
else else {
std::cerr << "Picked Node with name" << node->name() << std::endl; std::cerr << "Picked Node with name" << node->name() << std::endl;
std::cerr << "Target index was : " << target_idx << std::endl;
}
} }
} }
...@@ -210,9 +212,11 @@ void CoreWidget::updatePopupMenu(const QPoint& _point, unsigned int _examinerId) ...@@ -210,9 +212,11 @@ void CoreWidget::updatePopupMenu(const QPoint& _point, unsigned int _examinerId)
contextMenu_->addSeparator(); contextMenu_->addSeparator();
if (examiner_widgets_[0]->getPickMenu() != NULL) { if (examiner_widgets_[0]->getPickMenu() != NULL) {
examiner_widgets_[0]->getPickMenu()->setTitle("&Picking"); if ( examiner_widgets_[0]->getPickMenu()->actions().size() > 0 ) {
contextMenu_->addMenu(examiner_widgets_[0]->getPickMenu() ); examiner_widgets_[0]->getPickMenu()->setTitle("&Picking");
examiner_widgets_[0]->getPickMenu()->setTearOffEnabled(true); contextMenu_->addMenu(examiner_widgets_[0]->getPickMenu() );
examiner_widgets_[0]->getPickMenu()->setTearOffEnabled(true);
}
} }
// Add a functions menu // Add a functions menu
......
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