Skip to content
Permalink
Browse files

Fix for bug #3143, apply double values for label sizes

git-svn-id: http://svn.osgeo.org/qgis/trunk@14446 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Oct 29, 2010
1 parent d1fe144 commit 030f658ccd5b4df56b7771d4de473cf6a88823c3
Showing with 9 additions and 5 deletions.
  1. +1 −1 src/app/qgslabelinggui.cpp
  2. +3 −2 src/core/qgspallabeling.cpp
  3. +5 −2 src/ui/qgslabelingguibase.ui
@@ -406,7 +406,7 @@ void QgsLabelingGui::updateFont( QFont font )
{
fontSizeUnitString = tr( "map units" );
}
lblFontName->setText( QString( "%1, %2 %3" ).arg( font.family() ).arg( font.pointSize() ).arg( fontSizeUnitString ) );
lblFontName->setText( QString( "%1, %2 %3" ).arg( font.family() ).arg( font.pointSizeF() ).arg( fontSizeUnitString ) );
lblFontPreview->setFont( font );
updatePreview();
}
@@ -263,10 +263,11 @@ void QgsPalLayerSettings::readFromLayer( QgsVectorLayer* layer )
placement = ( Placement ) layer->customProperty( "labeling/placement" ).toInt();
placementFlags = layer->customProperty( "labeling/placementFlags" ).toUInt();
QString fontFamily = layer->customProperty( "labeling/fontFamily" ).toString();
int fontSize = layer->customProperty( "labeling/fontSize" ).toInt();
double fontSize = layer->customProperty( "labeling/fontSize" ).toDouble();
int fontWeight = layer->customProperty( "labeling/fontWeight" ).toInt();
bool fontItalic = layer->customProperty( "labeling/fontItalic" ).toBool();
textFont = QFont( fontFamily, fontSize, fontWeight, fontItalic );
textFont.setPointSizeF( fontSize ); //double precision needed because of map units
textColor = _readColor( layer, "labeling/textColor" );
enabled = layer->customProperty( "labeling/enabled" ).toBool();
priority = layer->customProperty( "labeling/priority" ).toInt();
@@ -295,7 +296,7 @@ void QgsPalLayerSettings::writeToLayer( QgsVectorLayer* layer )
layer->setCustomProperty( "labeling/placementFlags", ( unsigned int )placementFlags );

layer->setCustomProperty( "labeling/fontFamily", textFont.family() );
layer->setCustomProperty( "labeling/fontSize", textFont.pointSize() );
layer->setCustomProperty( "labeling/fontSize", textFont.pointSizeF() );
layer->setCustomProperty( "labeling/fontWeight", textFont.weight() );
layer->setCustomProperty( "labeling/fontItalic", textFont.italic() );

@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>504</width>
<height>686</height>
<width>515</width>
<height>692</height>
</rect>
</property>
<property name="windowTitle">
@@ -568,6 +568,9 @@
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QDoubleSpinBox" name="mFontSizeSpinBox">
<property name="decimals">
<number>4</number>
</property>
<property name="maximum">
<double>999999999.000000000000000</double>
</property>

0 comments on commit 030f658

Please sign in to comment.
You can’t perform that action at this time.