Skip to content
Permalink
Browse files

fix #2206

git-svn-id: http://svn.osgeo.org/qgis/trunk@12376 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Dec 8, 2009
1 parent 41b002a commit 25e35ec202a78c25e1adbb784e62945637b21648
Showing with 9 additions and 4 deletions.
  1. +9 −4 src/app/qgsidentifyresults.cpp
@@ -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 )
@@ -290,6 +291,10 @@ void QgsIdentifyResults::show()
// (saves the current window size/position)
void QgsIdentifyResults::close()
{
clearRubberbands();
delete mActionPopup;
mActionPopup = 0;

saveWindowLocation();
done( 0 );
}
@@ -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() ) );

0 comments on commit 25e35ec

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