Skip to content
Browse files
Make measure tool dialogs stay on top of other windows during operation
- Not tested with X11, may need Qt::X11BypassWindowManagerHint too
  • Loading branch information
dakcarto committed Feb 12, 2013
1 parent c8ca376 commit f29b55830b61f54f426c34db2eddcbcc25291c01
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/app/qgsmaptoolmeasureangle.cpp
  2. +1 −1 src/app/qgsmeasuretool.cpp
@@ -89,7 +89,7 @@ void QgsMapToolMeasureAngle::canvasReleaseEvent( QMouseEvent * e )
if ( mResultDisplay == NULL )
mResultDisplay = new QgsDisplayAngle( this );
mResultDisplay = new QgsDisplayAngle( this, Qt::WindowStaysOnTopHint );
QObject::connect( mResultDisplay, SIGNAL( rejected() ), this, SLOT( stopMeasuring() ) );
@@ -44,7 +44,7 @@ QgsMeasureTool::QgsMeasureTool( QgsMapCanvas* canvas, bool measureArea )
// Append point we will move
mPoints.append( QgsPoint( 0, 0 ) );

mDialog = new QgsMeasureDialog( this );
mDialog = new QgsMeasureDialog( this, Qt::WindowStaysOnTopHint );
mSnapper.setMapCanvas( canvas );

connect( canvas->mapRenderer(), SIGNAL( destinationSrsChanged() ),

2 comments on commit f29b558


This comment has been minimized.

Copy link

@Jean-Roc Jean-Roc replied Feb 14, 2013

Hi, would it not be better to dock these tools ?


This comment has been minimized.

Copy link
Member Author

@dakcarto dakcarto replied Feb 14, 2013

+1 for a dock widget. I wondered the same thing myself. This commit was a quick fix just to get the tools graphically functional on Mac (and maybe other platforms).

There could be one toolbar button for the measuring tool, which opens (or puts focus on) the dock widget. Then, the dock widget could contain the different measuring tools and icons, to switch between them. Or, the toolbar actions could be left as is, and the dock contents switched when the toolbar tool changes (though, I prefer first option with the tool actions part of the dock widget).

Please sign in to comment.