Bug report #3866
Measure tool is windows is unusable
| Status: | Closed | ||
|---|---|---|---|
| Priority: | Low | ||
| Assignee: | - | ||
| Category: | Map Canvas | ||
| Affected QGIS version: | Regression?: | No | |
| Operating System: | Windows | Easy fix?: | No |
| Pull Request or Patch supplied: | Resolution: | fixed | |
| Crashes QGIS or corrupts data: | Copied to github as #: | 13924 |
Description
In windows the measure tool is pretty much unusable, it's very slow and glitches a lot.
Looking at the debug log a lot of calls are made to setEllisoid(). Each time the mouse moves this is printed.
r45184 d:\\src\\qgis\\src\\core\\qgsdistancearea.cpp(161) : (QgsDistanceArea::setEllipsoid) setEllipsoid: a=6.37814e+06, b=6.37814e+06, 1/f=298.257 r45184 d:\\src\\qgis\\src\\core\\qgscoordinatereferencesystem.cpp(349) : (QgsCoordinateReferenceSystem::createFromProj4) proj4: +proj=longlat +ellps=WGS84 +no_defs r45184 d:\\src\\qgis\\src\\core\\qgscoordinatereferencesystem.cpp(378) : (QgsCoordinateReferenceSystem::createFromProj4) proj string supplied has no +a argument r45184 d:\\src\\qgis\\src\\core\\qgscoordinatereferencesystem.cpp(540) : (QgsCoordinateReferenceSystem::getRecord) running query: select * from tbl_srs where parameters='+proj=longlat +ellps=WGS84 +no_defs' r45184 d:\\src\\qgis\\src\\core\\qgscoordinatereferencesystem.cpp(562) : (QgsCoordinateReferenceSystem::getRecord) trying system srs.db r45184 d:\\src\\qgis\\src\\core\\qgscoordinatereferencesystem.cpp(617) : (QgsCoordinateReferenceSystem::getRecord) retrieved: select * from tbl_srs where parameters='+proj=longlat +ellps=WGS84 +no_defs' r45184 d:\\src\\qgis\\src\\core\\qgscoordinatereferencesystem.cpp(406) : (QgsCoordinateReferenceSystem::createFromProj4) proj4string match search for srsid returned srsid: 3239 r45184 d:\\src\\qgis\\src\\core\\qgscoordinatereferencesystem.cpp(799) : (QgsCoordinateReferenceSystem::setMapUnits) Projection has linear units of Meter r45184 d:\\src\\qgis\\src\\core\\qgscoordinatereferencesystem.cpp(799) : (QgsCoordinateReferenceSystem::setMapUnits) Projection has linear units of Meter
Tracked down to this bit of code:
void [[QgsMeasureDialog]]::configureDistanceArea( [[QgsDistanceArea]]& da )
{
QSettings settings;
QString ellipsoidId = settings.value( "/qgis/measure/ellipsoid", "WGS84" ).toString();
da.setSourceCrs( mTool->canvas()->mapRenderer()->destinationCrs().srsid() );
da.setEllipsoid( ellipsoidId );
da.setProjectionsEnabled( mcbProjectionEnabled->isChecked() );
}
Which is called on every mouse move. Do we really need to call it on every mouse move?
History
#1
Updated by Jürgen Fischer over 14 years ago
Why should it be slower on Windows? I suppose it's just the noisy debugging output that makes it slow.
#2
Updated by Jürgen Fischer over 14 years ago
- Resolution set to fixed
- Status changed from Open to Closed
fixed in 50d255f20fdb362c6b26bf0bec7f60e3f35ea1e2.
#3
Updated by Sergey Yakushev over 14 years ago
- File measure_angle.diff
added
This Bug is partial solved. The fact that a similar problem in the measuring angles tool (corrected only tool of measurement of distances and areas). Look at call QgsMapToolMeasureAngle::configureDistanceArea() in QgsMapToolMeastureAngle::canvasMouseMove() [1]
1. https://github.com/qgis/Quantum-GIS/blob/master/src/app/qgsmaptoolmeasureangle.cpp#L58
#4
Updated by Alexander Bruy over 14 years ago
- Assignee deleted (
nobody -)
Patch for measure angle tool applied in d750abfa2bfb197cde8e