[QGIS Commit] r9187 - trunk/qgis/src/app

svn_qgis at osgeo.org svn_qgis at osgeo.org
Wed Aug 27 06:10:29 EDT 2008


Author: jef
Date: 2008-08-27 06:10:29 -0400 (Wed, 27 Aug 2008)
New Revision: 9187

Modified:
   trunk/qgis/src/app/qgsgraduatedsymboldialog.cpp
Log:
fix #1076


Modified: trunk/qgis/src/app/qgsgraduatedsymboldialog.cpp
===================================================================
--- trunk/qgis/src/app/qgsgraduatedsymboldialog.cpp	2008-08-27 09:56:34 UTC (rev 9186)
+++ trunk/qgis/src/app/qgsgraduatedsymboldialog.cpp	2008-08-27 10:10:29 UTC (rev 9187)
@@ -16,6 +16,9 @@
  ***************************************************************************/
 /* $Id$ */
 
+#include <algorithm>
+#include <cmath>
+
 #include "qgsgraduatedsymboldialog.h"
 #include "qgsfield.h"
 #include "qgsgraduatedsymbolrenderer.h"
@@ -23,16 +26,12 @@
 #include "qgssymbol.h"
 #include "qgsvectordataprovider.h"
 #include "qgsvectorlayer.h"
-#include <algorithm>
-#include <cmath>
+#include "qgslogger.h"
 
-
 QgsGraduatedSymbolDialog::QgsGraduatedSymbolDialog( QgsVectorLayer * layer ): QDialog(), mVectorLayer( layer ), sydialog( layer )
 {
   setupUi( this );
-#ifdef QGISDEBUG
-  qWarning( "constructor QgsGraduatedSymbolDialog" );
-#endif
+  QgsDebugMsg( "entered." );
 
   setOrientation( Qt::Vertical );
 
@@ -57,7 +56,7 @@
   }
   else
   {
-    qWarning( "Warning, data provider is null in QgsGraduatedSymbolDialog::QgsGraduatedSymbolDialog(...)" );
+    QgsDebugMsg( "Warning, data provider is null" );
     return;
   }
 
@@ -120,16 +119,12 @@
 QgsGraduatedSymbolDialog::QgsGraduatedSymbolDialog(): QDialog(), mVectorLayer( 0 ), sydialog( 0 )
 {
   setupUi( this );
-#ifdef QGISDEBUG
-  qWarning( "constructor QgsGraduatedSymbolDialog" );
-#endif
+  QgsDebugMsg( "entered." );
 }
 
 QgsGraduatedSymbolDialog::~QgsGraduatedSymbolDialog()
 {
-#ifdef QGISDEBUG
-  qWarning( "destructor QgsGraduatedSymbolDialog" );
-#endif
+  QgsDebugMsg( "entered." );
 }
 
 void QgsGraduatedSymbolDialog::adjustNumberOfClasses()
@@ -307,7 +302,7 @@
     std::list<double>::const_iterator it;
     std::list<double>::const_iterator last_it = quantileBorders.end();
     std::list<QgsSymbol*>::const_iterator symbol_it = symbolList.begin();
-    for ( it = quantileBorders.begin(); it != quantileBorders.end(); ++it )
+    for ( it = quantileBorders.begin(); symbol_it != symbolList.end() && it != quantileBorders.end(); ++it )
     {
       if ( last_it != quantileBorders.end() )
       {
@@ -440,17 +435,16 @@
   int currentIndex = mClassListWidget->currentRow();
   mEntries.erase( classValue );
   delete( mClassListWidget->takeItem( currentIndex ) );
-  qWarning( "numRows: " );
-  qWarning( QString::number( mClassListWidget->count() ).toUtf8() );
+  QgsDebugMsg( QString("numRows: %1").arg( mClassListWidget->count() ) );
   //
   if ( mClassListWidget->count() < ( currentIndex + 1 ) )
   {
-    qWarning( "selecting numRows - 1" );
+    QgsDebugMsg( "selecting numRows - 1" );
     mClassListWidget->setCurrentRow( mClassListWidget->count() - 1 );
   }
   else
   {
-    qWarning( "selecting currentIndex" );
+    QgsDebugMsg( "selecting currentIndex" );
     mClassListWidget->setCurrentRow( currentIndex );
   }
 }



More information about the QGIS-commit mailing list