Skip to content
Permalink
Browse files

Restore buttonbox visibility after attribute form reload

Followup febe37d

Fix #11229
Fix #11194
  • Loading branch information
m-kuhn committed Sep 22, 2014
1 parent a3d3a44 commit 35936084ff9c6ff912611bab471a3ddf20aa906b
Showing with 11 additions and 2 deletions.
  1. +11 −2 src/gui/qgsattributeform.cpp
@@ -312,8 +312,15 @@ void QgsAttributeForm::init()

// Cleanup of any previously shown widget, we start from scratch
QWidget* formWidget = 0;
delete mButtonBox;
mButtonBox = 0;

bool buttonBoxVisible = true;
// Cleanup button box but preserve visibility
if ( mButtonBox )
{
buttonBoxVisible = mButtonBox->isVisible();
delete mButtonBox;
mButtonBox = 0;
}

qDeleteAll( mWidgets );
mWidgets.clear();
@@ -451,6 +458,8 @@ void QgsAttributeForm::init()
layout()->addWidget( mButtonBox );
}

mButtonBox->setVisible( buttonBoxVisible );

connectWrappers();

connect( mButtonBox, SIGNAL( accepted() ), this, SLOT( accept() ) );

0 comments on commit 3593608

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