[QGIS Commit] r12441 - trunk/qgis/src/plugins/copyright_label

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sun Dec 13 17:05:52 EST 2009


Author: jef
Date: 2009-12-13 17:05:52 -0500 (Sun, 13 Dec 2009)
New Revision: 12441

Modified:
   trunk/qgis/src/plugins/copyright_label/plugin.cpp
Log:
apply #2277

Modified: trunk/qgis/src/plugins/copyright_label/plugin.cpp
===================================================================
--- trunk/qgis/src/plugins/copyright_label/plugin.cpp	2009-12-13 22:04:21 UTC (rev 12440)
+++ trunk/qgis/src/plugins/copyright_label/plugin.cpp	2009-12-13 22:05:52 UTC (rev 12441)
@@ -108,8 +108,9 @@
   now = QDate::currentDate();
   defString = "© QGIS " + now.toString( "yyyy" );
 
-  mQFont.setFamily( QgsProject::instance()->readEntry( "CopyrightLabel", "/FontName", "Sans Serif" ) );
-  mQFont.setPointSize( QgsProject::instance()->readNumEntry( "CopyrightLabel", "/FontSize", 9 ) );
+  // there is no font setting in the UI, so just use the Qt/QGIS default font (what mQFont gets when created)
+  //  mQFont.setFamily( QgsProject::instance()->readEntry( "CopyrightLabel", "/FontName", "Sans Serif" ) );
+  //  mQFont.setPointSize( QgsProject::instance()->readNumEntry( "CopyrightLabel", "/FontSize", 9 ) );
   mLabelQString = QgsProject::instance()->readEntry( "CopyrightLabel", "/Label", defString );
   mPlacementIndex = QgsProject::instance()->readNumEntry( "CopyrightLabel", "/Placement", 3 );
   mEnable = QgsProject::instance()->readBoolEntry( "CopyrightLabel", "/Enabled", true );
@@ -171,7 +172,7 @@
     {
       case 0: // Bottom Left
         //Define bottom left hand corner start point
-        myYOffset = myHeight - size.height() + 5;
+        myYOffset = myHeight - ( size.height() + 5 );
         myXOffset = 5;
         break;
       case 1: // Top left
@@ -186,7 +187,7 @@
         break;
       case 3: // Bottom Right
         //Define bottom right hand corner start point
-        myYOffset = myHeight - size.height() + 5;
+        myYOffset = myHeight - ( size.height() + 5 );
         myXOffset = myWidth - ( size.width() + 5 );
         break;
       default:



More information about the QGIS-commit mailing list