Skip to content

Commit f07b63b

Browse files
author
timlinux
committedAug 3, 2008
Get rid of some extraneous debug output / noise
git-svn-id: http://svn.osgeo.org/qgis/trunk@8986 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 7a7e65d commit f07b63b

File tree

1 file changed

+23
-22
lines changed

1 file changed

+23
-22
lines changed
 

‎src/plugins/north_arrow/plugin.cpp

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ void QgsNorthArrowPlugin::initGui()
110110

111111
void QgsNorthArrowPlugin::projectRead()
112112
{
113-
QgsDebugMsg("+++++++++ north arrow plugin - project read slot called....");
114113
//default text to start with - try to fetch it from qgsproject
115114

116115
mRotationInt = QgsProject::instance()->readNumEntry("NorthArrow","/Rotation",0);
@@ -160,19 +159,19 @@ void QgsNorthArrowPlugin::renderNorthArrow(QPainter * theQPainter)
160159
{
161160
if (theQPainter->isActive())
162161
{
163-
QgsDebugMsg("Rendering north arrow on active painter");
162+
//QgsDebugMsg("Rendering north arrow on active painter");
164163
}
165164
else
166165
{
167-
QgsDebugMsg("Rendering north arrow on INactive painter!!!");
166+
//QgsDebugMsg("Rendering north arrow on INactive painter!!!");
168167
}
169168

170169
QPixmap myQPixmap; //to store the north arrow image in
171170

172171
QString myFileNameQString = QDir::cleanPath( QgsApplication::pkgDataPath() +
173172
"/images/north_arrows/default.png" );
174173

175-
QgsDebugMsg("Trying to load " + myFileNameQString);
174+
//QgsDebugMsg("Trying to load " + myFileNameQString);
176175
if (myQPixmap.load(myFileNameQString))
177176
{
178177

@@ -205,27 +204,29 @@ void QgsNorthArrowPlugin::renderNorthArrow(QPainter * theQPainter)
205204
int myHeight = theQPainter->device()->height();
206205
int myWidth = theQPainter->device()->width();
207206

208-
QgsDebugMsg("Rendering north arrow at " + mPlacementLabels.at(mPlacementIndex));
207+
//QgsDebugMsg("Rendering north arrow at " + mPlacementLabels.at(mPlacementIndex));
209208

210209
//Determine placement of label from form combo box
211210
switch (mPlacementIndex)
212211
{
213-
case 0: // Bottom Left
214-
theQPainter->translate(0,myHeight-myQPixmap.height());
215-
break;
216-
case 1: // Top Left
217-
//no need to translate for TL corner because we're already at the origin
218-
theQPainter->translate(0, 0);
219-
break;
220-
case 2: // Top Right
221-
theQPainter->translate(myWidth-myQPixmap.width(),0);
222-
break;
223-
case 3: // Bottom Right
224-
theQPainter->translate(myWidth-myQPixmap.width(),
225-
myHeight-myQPixmap.height());
226-
break;
227-
default:
228-
QgsDebugMsg("Unable to determine where to put north arrow so defaulting to top left");
212+
case 0: // Bottom Left
213+
theQPainter->translate(0,myHeight-myQPixmap.height());
214+
break;
215+
case 1: // Top Left
216+
//no need to translate for TL corner because we're already at the origin
217+
theQPainter->translate(0, 0);
218+
break;
219+
case 2: // Top Right
220+
theQPainter->translate(myWidth-myQPixmap.width(),0);
221+
break;
222+
case 3: // Bottom Right
223+
theQPainter->translate(myWidth-myQPixmap.width(),
224+
myHeight-myQPixmap.height());
225+
break;
226+
default:
227+
{
228+
//QgsDebugMsg("Unable to determine where to put north arrow so defaulting to top left");
229+
}
229230
}
230231
//rotate the canvas by the north arrow rotation amount
231232
theQPainter->rotate( mRotationInt );
@@ -324,7 +325,7 @@ bool QgsNorthArrowPlugin::calculateNorthDirection()
324325
{
325326
Q_UNUSED(e);
326327
// just give up
327-
QgsDebugMsg("Transformation error, quitting");
328+
QgsDebugMsg("North Arrow: Transformation error, quitting");
328329
return false;
329330
}
330331

0 commit comments

Comments
 (0)
Please sign in to comment.