Skip to content
Permalink
Browse files

Fix graphical glitches caused by empty menu on attribute dialog

Fix #12061
  • Loading branch information
m-kuhn committed Jan 29, 2015
1 parent 16f309b commit c19eb60d2fe797c475881cfa46666133e410fc70
Showing with 7 additions and 4 deletions.
  1. +7 −3 src/gui/qgsattributedialog.cpp
  2. +0 −1 src/gui/qgsattributedialog.h
@@ -109,12 +109,16 @@ void QgsAttributeDialog::init( QgsVectorLayer* layer, QgsFeature* feature, QgsAt
connect( buttonBox, SIGNAL( rejected() ), this, SLOT( reject() ) );
connect( buttonBox, SIGNAL( accepted() ), this, SLOT( accept() ) );

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

restoreGeometry();
@@ -135,7 +135,6 @@ class GUI_EXPORT QgsAttributeDialog : public QDialog
bool mShowDialogButtons;
QString mReturnvarname;
QgsAttributeForm* mAttributeForm;
QMenuBar* mMenuBar;
QgsFeature *mOwnedFeature;

// true if this dialog is editable

0 comments on commit c19eb60

Please sign in to comment.
You can’t perform that action at this time.