Skip to content

Commit a41a9a3

Browse files
committedOct 23, 2014
delete rubber bands when exiting identify menu
1 parent cc30609 commit a41a9a3

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed
 

‎python/gui/qgsidentifymenu.sip

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,7 @@ class QgsIdentifyMenu : QMenu
8383
* @param selectedAction if specified, this will allow to know which action has been triggered
8484
*/
8585
QList<QgsMapToolIdentify::IdentifyResult> exec( const QList<QgsMapToolIdentify::IdentifyResult> idResults, QPoint pos );
86+
87+
protected:
88+
virtual void closeEvent( QCloseEvent *e );
8689
};

‎src/gui/qgsidentifymenu.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,12 @@ QList<QgsMapToolIdentify::IdentifyResult> QgsIdentifyMenu::exec( const QList<Qgs
151151
}
152152
}
153153

154+
void QgsIdentifyMenu::closeEvent( QCloseEvent* e )
155+
{
156+
deleteRubberBands();
157+
QMenu::closeEvent( e );
158+
}
159+
154160
void QgsIdentifyMenu::addRasterLayer( QgsMapLayer* layer )
155161
{
156162
QAction* layerAction;

‎src/gui/qgsidentifymenu.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ class GUI_EXPORT QgsIdentifyMenu : public QMenu
129129
*/
130130
QList<QgsMapToolIdentify::IdentifyResult> exec( const QList<QgsMapToolIdentify::IdentifyResult> idResults, QPoint pos );
131131

132+
protected:
133+
virtual void closeEvent( QCloseEvent *e );
134+
132135
private slots:
133136
void handleMenuHover();
134137
void deleteRubberBands();

0 commit comments

Comments
 (0)
Please sign in to comment.