Merge pull request #1653 from 3nids/fixidentmenurubber

delete rubber bands when exiting identify menu
This commit is contained in:
Martin Dobias 2014-10-23 21:05:46 +07:00
commit 2c19543178
3 changed files with 12 additions and 0 deletions

View File

@ -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 );
};

View File

@ -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;

View File

@ -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();