Skip to content
Permalink
Browse files
Only add feature once when python init function is set on attribute form
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.
@@ -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() ) );
}

0 comments on commit bd5846b

Please sign in to comment.