Feature request #68

No value is shown in Measure Distance/Area

Added by Redmine Admin over 14 years ago. Updated almost 11 years ago.

Assignee:Gary Sherman
Pull Request or Patch supplied: Resolution:worksforme
Easy fix?:No Copied to github as #:10127


In Measure Distance window no total value is shown. The same issue occurs in Measure Area.

measure.png - screenshot (50.1 KB) Redmine Admin, 2006-04-11 04:32 AM

fix.diff Magnifier (1.2 KB) Redmine Admin, 2006-04-16 08:08 AM


#1 Updated by Gavin Macaulay - over 14 years ago

Works for me. Any one else having problems?

#2 Updated by Redmine Admin over 14 years ago

See attached screenshot. Built against Qt 4.1.0

#3 Updated by Gavin Macaulay - over 14 years ago

Can you add the following line to the beginning of the formatDistance() function in src/gui/qgsmeasure.cpp, recompile, run qgis, load your data and use the measure line tool, and then tell use you get on the console?

std::cerr << distance << '\

This should tell me whether the problem is in the calculation of the length or in the display of the length.

#4 Updated by Redmine Admin about 14 years ago

I've done, what you said and it seems that distance and also mTotal values are calculated properly and there is problem to display them. Even if I put to editTotal some string explicitly nothing was displayed. This led me to check if there is some problem with font rendering. When I set Sans Serif font in qgismeasurebase.ui (with Qt Designer) and then rebuild, the problem disapperared. Yuppiii, wow...

I've attached patch which resolves my problem (it only sets Sans Serif font in QgisMeasureBase.ui)

Conclusion: In UI should be set the most common fonts (to avoid similar issues)

#5 Updated by Gavin Macaulay - about 14 years ago

This may be a problem with qt4.1.0. I suggest moving to 4.1.1 rather than hard-coding a font in qgis.

#6 Updated by Redmine Admin about 14 years ago

  • Status changed from Open to Closed
  • Resolution set to worksforme

It is Qt-4.1.0 related problem. My upgrade to Qt-4.1.2 resolves this problem.

#7 Updated by Anonymous almost 11 years ago

Milestone Version 0.8 deleted

Also available in: Atom PDF