Skip to content

Commit

Permalink
fix #1076
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@9187 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Aug 27, 2008
1 parent 4cdfa2c commit 1930283
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions src/app/qgsgraduatedsymboldialog.cpp
Expand Up @@ -16,23 +16,22 @@
***************************************************************************/
/* $Id$ */

#include <algorithm>
#include <cmath>

#include "qgsgraduatedsymboldialog.h"
#include "qgsfield.h"
#include "qgsgraduatedsymbolrenderer.h"
#include "qgsludialog.h"
#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 );

Expand All @@ -57,7 +56,7 @@ QgsGraduatedSymbolDialog::QgsGraduatedSymbolDialog( QgsVectorLayer * layer ): QD
}
else
{
qWarning( "Warning, data provider is null in QgsGraduatedSymbolDialog::QgsGraduatedSymbolDialog(...)" );
QgsDebugMsg( "Warning, data provider is null" );
return;
}

Expand Down Expand Up @@ -120,16 +119,12 @@ QgsGraduatedSymbolDialog::QgsGraduatedSymbolDialog( QgsVectorLayer * layer ): QD
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()
Expand Down Expand Up @@ -307,7 +302,7 @@ void QgsGraduatedSymbolDialog::adjustClassification()
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() )
{
Expand Down Expand Up @@ -440,17 +435,16 @@ void QgsGraduatedSymbolDialog::deleteCurrentClass()
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 );
}
}
Expand Down

0 comments on commit 1930283

Please sign in to comment.