mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
Fix graphical glitches caused by empty menu on attribute dialog
Fix #12061
This commit is contained in:
parent
16f309b617
commit
c19eb60d2f
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user