Skip to content

Commit

Permalink
delete rubber bands when exiting identify menu
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Oct 23, 2014
1 parent cc30609 commit a41a9a3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/gui/qgsidentifymenu.sip
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,7 @@ class QgsIdentifyMenu : QMenu
* @param selectedAction if specified, this will allow to know which action has been triggered
*/
QList<QgsMapToolIdentify::IdentifyResult> exec( const QList<QgsMapToolIdentify::IdentifyResult> idResults, QPoint pos );

protected:
virtual void closeEvent( QCloseEvent *e );
};
6 changes: 6 additions & 0 deletions src/gui/qgsidentifymenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ QList<QgsMapToolIdentify::IdentifyResult> QgsIdentifyMenu::exec( const QList<Qgs
}
}

void QgsIdentifyMenu::closeEvent( QCloseEvent* e )
{
deleteRubberBands();
QMenu::closeEvent( e );
}

void QgsIdentifyMenu::addRasterLayer( QgsMapLayer* layer )
{
QAction* layerAction;
Expand Down
3 changes: 3 additions & 0 deletions src/gui/qgsidentifymenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ class GUI_EXPORT QgsIdentifyMenu : public QMenu
*/
QList<QgsMapToolIdentify::IdentifyResult> exec( const QList<QgsMapToolIdentify::IdentifyResult> idResults, QPoint pos );

protected:
virtual void closeEvent( QCloseEvent *e );

private slots:
void handleMenuHover();
void deleteRubberBands();
Expand Down

0 comments on commit a41a9a3

Please sign in to comment.