Skip to content
Permalink
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 f29b558
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
@@ -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() ) );
}
configureDistanceArea();
@@ -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

@Jean-Roc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@dakcarto
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+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.