Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 3593608
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/gui/qgsattributeform.cpp
Expand Up @@ -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();
Expand Down Expand Up @@ -451,6 +458,8 @@ void QgsAttributeForm::init()
layout()->addWidget( mButtonBox );
}

mButtonBox->setVisible( buttonBoxVisible );

connectWrappers();

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

0 comments on commit 3593608

Please sign in to comment.