Skip to content

Commit

Permalink
Only add feature once when python init function is set on attribute form
Browse files Browse the repository at this point in the history
Fix #10862
  • Loading branch information
m-kuhn committed Jul 23, 2014
1 parent 9648bc7 commit bd5846b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gui/qgsattributeformlegacyinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ void QgsAttributeFormLegacyInterface::featureChanged()
QDialogButtonBox* buttonBox = form()->findChild<QDialogButtonBox*>();
if ( buttonBox )
{
// If the init function did not call disconnect, we do it here before reconnecting
// If it did call disconnect, then the call will just do nothing
QObject::disconnect( buttonBox, SIGNAL( accepted() ), form(), SLOT( accept() ) );
QObject::connect( buttonBox, SIGNAL( accepted() ), form(), SLOT( accept() ) );
}

Expand Down

0 comments on commit bd5846b

Please sign in to comment.