Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix one memory leak + add note to show() calls as they will delete th…
…e dialog
  • Loading branch information
wonder-sk committed Oct 21, 2014
1 parent 93864ce commit aa46df2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/app/qgsfeatureaction.cpp
Expand Up @@ -97,7 +97,7 @@ bool QgsFeatureAction::viewFeatureForm( QgsHighlight *h )

QgsAttributeDialog *dialog = newDialog( true );
dialog->setHighlight( h );
dialog->show();
dialog->show(); // will also delete the dialog on close (show() is overridden)

return true;
}
Expand All @@ -122,7 +122,7 @@ bool QgsFeatureAction::editFeature( bool showModal )
}
else
{
dialog->show();
dialog->show(); // will also delete the dialog on close (show() is overridden)
}

return true;
Expand Down Expand Up @@ -196,11 +196,12 @@ bool QgsFeatureAction::addFeature( const QgsAttributeMap& defaultAttributes, boo

if ( showModal )
{
dialog->setAttribute( Qt::WA_DeleteOnClose );
dialog->exec();
}
else
{
dialog->show();
dialog->show(); // will also delete the dialog on close (show() is overridden)
return true;
}
}
Expand Down

0 comments on commit aa46df2

Please sign in to comment.