Skip to content
Permalink
Browse files

Revert "attribute dialog: keep clone feature until destruction (fixes…

… crash from action"

This reverts commit f9fcee9.
  • Loading branch information
m-kuhn committed Oct 29, 2014
1 parent 4cf08c5 commit f618cae5e8a9c893038101db54f5ddecb5087cdf
Showing with 6 additions and 6 deletions.
  1. +6 −5 src/gui/qgsattributedialog.cpp
  2. +0 −1 src/gui/qgsattributedialog.h
@@ -28,7 +28,6 @@
QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer* vl, QgsFeature* thepFeature, bool featureOwner, QgsDistanceArea myDa, QWidget* parent, bool showDialogButtons )
: QDialog( parent )
, mHighlight( 0 )
, mOwnedFeature( featureOwner ? thepFeature : 0 )
{
QgsAttributeEditorContext context;
context.setDistanceArea( myDa );
@@ -37,17 +36,22 @@ QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer* vl, QgsFeature* thepFeat

if ( !showDialogButtons )
mAttributeForm->hideButtonBox();

if ( featureOwner )
delete thepFeature;
}

QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer* vl, QgsFeature* thepFeature, bool featureOwner, QWidget* parent, bool showDialogButtons, QgsAttributeEditorContext context )
: QDialog( parent )
, mHighlight( 0 )
, mOwnedFeature( featureOwner ? thepFeature : 0 )
{
init( vl, thepFeature, context, parent );

if ( !showDialogButtons )
mAttributeForm->hideButtonBox();

if ( featureOwner )
delete thepFeature;
}

QgsAttributeDialog::~QgsAttributeDialog()
@@ -58,9 +62,6 @@ QgsAttributeDialog::~QgsAttributeDialog()
delete mHighlight;
}

if( mOwnedFeature )
delete mOwnedFeature;

saveGeometry();
}

@@ -136,7 +136,6 @@ class GUI_EXPORT QgsAttributeDialog : public QDialog
QString mReturnvarname;
QgsAttributeForm* mAttributeForm;
QMenuBar* mMenuBar;
QgsFeature *mOwnedFeature;

// true if this dialog is editable
bool mEditable;

0 comments on commit f618cae

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