[QGIS-trac] Re: [Quantum GIS] #1447: gaps in lines for outline
width < 0.26
Quantum GIS
qgis at qgis.org
Sun Dec 28 22:29:00 EST 2008
#1447: gaps in lines for outline width < 0.26
-----------------------------------------------------+----------------------
Reporter: msieczka | Owner: nobody
Type: bug | Status: new
Priority: major: does not work as expected | Milestone: Version 1.0.1
Component: Graphics | Version: HEAD
Resolution: | Keywords:
Platform_version: | Platform: All
Must_fix: Yes | Status_info: 0
-----------------------------------------------------+----------------------
Comment (by smizuno):
I am providing a patch to fix problems getting the default outline width
set in all symbol classifiers.
I noticed that there are several places in various symbology classes that
have something like:
pen.setWidthF( DEFAULT_LINE_WIDTH )
but still some classifiers were not getting the setting.
I reasoned that the setting should be in the symbol class and the
classifiers should pick up the setting as needed. So the question was: why
is it necessary to be putting the default into the various classifiers?
Also, why do some appear not to work?
Looking in the various classes having something to do with symbols and
classification I found in QgsSymbol several instances of pen.setWidth()
that should have been pen.setWidthF() to accept floating point values. The
value would become 0 for the typical fractional value. Fixing these made
it possible to get the default value from any symbol created instead of
having to explicitly set DEFAULT_LINE_WIDTH in the various ...SymbolDialog
classes. QgsGraduatedSymbolDialog also had the F missing in a
pen.setWidth() statement.
The ...SymbolDialog classes are changed to retrieve the line width from
the created symbols as necessary.
There is one situation in QgsContinuousColorSymbolDialog that needs
DEFAULT_LINE_WIDTH as there is no symbol object to use. I did not change
this as it was already set up this way.
I believe there are instances of setting default values for other
parameters that should be retrieved from created symbol objects instead of
explicitly setting them in the classifier dialogs, but I am leaving that
for another day.
--
Ticket URL: <https://trac.osgeo.org/qgis/ticket/1447#comment:3>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats
More information about the QGIS-trac
mailing list