Skip to content
Permalink
Browse files

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 aa46df2fadfb443611ea1d89a13acfc8634ab45f
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/app/qgsfeatureaction.cpp
@@ -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;
}
@@ -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;
@@ -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;
}
}

0 comments on commit aa46df2

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