Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #1653 from 3nids/fixidentmenurubber
delete rubber bands when exiting identify menu
  • Loading branch information
wonder-sk committed Oct 23, 2014
2 parents cc30609 + a41a9a3 commit 2c19543
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
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
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
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 2c19543

Please sign in to comment.