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

Added drawModeMenu to the view menu

Only add drawMenu to context menu if option is set

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@3021 383ad7c9-94d9-4d36-a494-682f7c89f535
parent acbefdaf
...@@ -201,7 +201,7 @@ void CoreWidget::updatePopupMenu(const QPoint& _point) { ...@@ -201,7 +201,7 @@ void CoreWidget::updatePopupMenu(const QPoint& _point) {
examiner_widget_->getFuncMenu()->setTearOffEnabled(true); examiner_widget_->getFuncMenu()->setTearOffEnabled(true);
} }
if (examiner_widget_->getDrawMenu() != NULL) { if ( ( examiner_widget_->getDrawMenu() != NULL ) && OpenFlipper::Options::drawModesInContextMenu() ) {
examiner_widget_->getDrawMenu()->setTitle("&DrawModes"); examiner_widget_->getDrawMenu()->setTitle("&DrawModes");
QAction* drawMenuAction = contextMenu_->addMenu(examiner_widget_->getDrawMenu() ); QAction* drawMenuAction = contextMenu_->addMenu(examiner_widget_->getDrawMenu() );
......
...@@ -84,6 +84,18 @@ void CoreWidget::setupMenuBar() ...@@ -84,6 +84,18 @@ void CoreWidget::setupMenuBar()
viewMenu_ = new QMenu(tr("&View")); viewMenu_ = new QMenu(tr("&View"));
menuBar()->addMenu(viewMenu_ ); menuBar()->addMenu(viewMenu_ );
if (examiner_widget_->getDrawMenu() != NULL) {
examiner_widget_->getDrawMenu()->setTitle("&DrawModes");
QAction* drawMenuAction = viewMenu_->addMenu(examiner_widget_->getDrawMenu() );
QIcon icon;
icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"drawModes.png");
drawMenuAction->setIcon(icon);
examiner_widget_->getDrawMenu()->setTearOffEnabled(true);
}
QIcon icon; QIcon icon;
//Clear all //Clear all
......
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