mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Added a signal from canvas when it has refreshed
This commit is contained in:
parent
13a790de08
commit
5ba8422893
@ -57,7 +57,9 @@ QgsMeasureDialog::QgsMeasureDialog( QgsMeasureTool* tool, Qt::WFlags f )
|
||||
else
|
||||
mcbProjectionEnabled->setCheckState( Qt::Unchecked );
|
||||
|
||||
connect( mcbProjectionEnabled, SIGNAL( stateChanged( int ) ),
|
||||
// Update whenever the canvas has refreshed. Maybe more often than needed,
|
||||
// but at least every time any settings changes
|
||||
connect( mTool->canvas(), SIGNAL( mapCanvasRefreshed() ),
|
||||
this, SLOT( changeProjectionEnabledState() ) );
|
||||
|
||||
updateUi();
|
||||
@ -298,6 +300,7 @@ void QgsMeasureDialog::convertMeasurement( double &measure, QGis::UnitType &u, b
|
||||
|
||||
void QgsMeasureDialog::changeProjectionEnabledState()
|
||||
{
|
||||
QgsDebugMsg( "Entering!" );
|
||||
// store value
|
||||
QSettings settings;
|
||||
if ( mcbProjectionEnabled->isChecked() )
|
||||
@ -354,6 +357,7 @@ void QgsMeasureDialog::changeProjectionEnabledState()
|
||||
b = false;
|
||||
}
|
||||
}
|
||||
QgsDebugMsg( "Exiting!" );
|
||||
}
|
||||
|
||||
void QgsMeasureDialog::configureDistanceArea()
|
||||
|
@ -48,6 +48,7 @@ QgsMeasureTool::QgsMeasureTool( QgsMapCanvas* canvas, bool measureArea )
|
||||
|
||||
QgsMeasureTool::~QgsMeasureTool()
|
||||
{
|
||||
delete mDialog;
|
||||
delete mRubberBand;
|
||||
}
|
||||
|
||||
|
@ -427,6 +427,10 @@ void QgsMapCanvas::refresh()
|
||||
}
|
||||
|
||||
mDrawing = false;
|
||||
|
||||
// Done refreshing
|
||||
emit mapCanvasRefreshed();
|
||||
|
||||
} // refresh
|
||||
|
||||
void QgsMapCanvas::updateMap()
|
||||
|
@ -335,6 +335,10 @@ class GUI_EXPORT QgsMapCanvas : public QGraphicsView
|
||||
*/
|
||||
void renderComplete( QPainter * );
|
||||
|
||||
/** Emitted when canvas finished a refresh request.
|
||||
\note Added in 2.0 */
|
||||
void mapCanvasRefreshed();
|
||||
|
||||
/** Emitted when the canvas is about to be rendered.
|
||||
\note Added in 1.5 */
|
||||
void renderStarting();
|
||||
|
Loading…
x
Reference in New Issue
Block a user