Skip to content

Commit

Permalink
Make measure dialog only stay on top of QGIS window (fix #12261)
Browse files Browse the repository at this point in the history
(cherry-picked from 340a6f6)
  • Loading branch information
nyalldawson committed Jul 1, 2016
1 parent 4235f9e commit eb5b428
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/app/qgsmaptoolmeasureangle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ void QgsMapToolMeasureAngle::canvasReleaseEvent( QgsMapMouseEvent* e )
{
if ( !mResultDisplay )
{
mResultDisplay = new QgsDisplayAngle( this, Qt::WindowStaysOnTopHint );
mResultDisplay = new QgsDisplayAngle( this );
mResultDisplay->setWindowFlags( mResultDisplay->windowFlags() | Qt::Tool );
QObject::connect( mResultDisplay, SIGNAL( rejected() ), this, SLOT( stopMeasuring() ) );
}
configureDistanceArea();
Expand Down
3 changes: 2 additions & 1 deletion src/app/qgsmeasuretool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ QgsMeasureTool::QgsMeasureTool( QgsMapCanvas* canvas, bool measureArea )
// Append point we will move
mPoints.append( QgsPoint( 0, 0 ) );

mDialog = new QgsMeasureDialog( this, Qt::WindowStaysOnTopHint );
mDialog = new QgsMeasureDialog( this );
mDialog->setWindowFlags( mDialog->windowFlags() | Qt::Tool );
mDialog->restorePosition();

connect( canvas, SIGNAL( destinationCrsChanged() ),
Expand Down

0 comments on commit eb5b428

Please sign in to comment.