Skip to content

Commit

Permalink
fix #2206
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@12376 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Dec 8, 2009
1 parent 41b002a commit 25e35ec
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/app/qgsidentifyresults.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ QgsIdentifyResults::QgsIdentifyResults( QgsMapCanvas *canvas, QWidget *parent, Q
QgsIdentifyResults::~QgsIdentifyResults()
{
clearRubberbands();
delete mActionPopup;
if ( mActionPopup )
delete mActionPopup;
}

QTreeWidgetItem *QgsIdentifyResults::layerItem( QObject *layer )
Expand Down Expand Up @@ -290,6 +291,10 @@ void QgsIdentifyResults::show()
// (saves the current window size/position)
void QgsIdentifyResults::close()
{
clearRubberbands();
delete mActionPopup;
mActionPopup = 0;

saveWindowLocation();
done( 0 );
}
Expand Down Expand Up @@ -327,13 +332,13 @@ void QgsIdentifyResults::contextMenuEvent( QContextMenuEvent* event )
if ( !item )
return;

if ( mActionPopup )
delete mActionPopup;

QgsVectorLayer *vlayer = vectorLayer( item );
if ( vlayer == 0 )
return;

if ( mActionPopup )
delete mActionPopup;

mActionPopup = new QMenu();

mActionPopup->addAction( vlayer->isEditable() ? tr( "Edit feature form" ) : tr( "View feature form" ), this, SLOT( featureForm() ) );
Expand Down

0 comments on commit 25e35ec

Please sign in to comment.