Skip to content

Commit

Permalink
Only show actions menu on attribute dialog when necessary
Browse files Browse the repository at this point in the history
Fix #12013
  • Loading branch information
m-kuhn committed Jan 21, 2015
1 parent f0a7a1c commit ea54b3c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/gui/qgsattributedialog.cpp
Expand Up @@ -111,8 +111,11 @@ void QgsAttributeDialog::init( QgsVectorLayer* layer, QgsFeature* feature, QgsAt

mMenuBar = new QMenuBar( this );
QgsActionMenu* menu = new QgsActionMenu( layer, &mAttributeForm->feature(), this );
mMenuBar->addMenu( menu );
layout()->setMenuBar( mMenuBar );
if ( menu->actions().size() > 0 )
{
mMenuBar->addMenu( menu );
layout()->setMenuBar( mMenuBar );
}

restoreGeometry();
focusNextChild();
Expand Down

0 comments on commit ea54b3c

Please sign in to comment.