Skip to content
Permalink
Browse files

Fixed #2422

git-svn-id: http://svn.osgeo.org/qgis/trunk@12939 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder
wonder committed Feb 12, 2010
1 parent 66dc1d5 commit 1b575f1d0d9eb412c450ab796bbf73bda8b1beed
@@ -188,7 +188,7 @@ void QgsCategorizedSymbolRendererV2Widget::populateColorRamps()

void QgsCategorizedSymbolRendererV2Widget::categoryColumnChanged()
{
deleteAllCategories();
mRenderer->setClassAttribute( cboCategorizedColumn->currentText() );
}

void QgsCategorizedSymbolRendererV2Widget::categoriesDoubleClicked( const QModelIndex & idx )
@@ -54,6 +54,7 @@ QgsGraduatedSymbolRendererV2Widget::QgsGraduatedSymbolRendererV2Widget( QgsVecto

mGraduatedSymbol = QgsSymbolV2::defaultSymbol( mLayer->geometryType() );

connect( cboGraduatedColumn, SIGNAL( currentIndexChanged( int ) ), this, SLOT( graduatedColumnChanged() ) );
connect( viewGraduated, SIGNAL( doubleClicked( const QModelIndex & ) ), this, SLOT( rangesDoubleClicked( const QModelIndex & ) ) );
connect( viewGraduated, SIGNAL( clicked( const QModelIndex & ) ), this, SLOT( rangesClicked( const QModelIndex & ) ) );
connect( mg, SIGNAL( itemChanged( QStandardItem * ) ), this, SLOT( changeCurrentValue( QStandardItem * ) ) );
@@ -92,11 +93,11 @@ void QgsGraduatedSymbolRendererV2Widget::updateUiFromRenderer()
spinGraduatedClasses->setValue( mRenderer->ranges().count() );

// set column
//disconnect(cboGraduatedColumn, SIGNAL(currentIndexChanged(int)), this, SLOT(graduatedColumnChanged()));
disconnect( cboGraduatedColumn, SIGNAL( currentIndexChanged( int ) ), this, SLOT( graduatedColumnChanged() ) );
QString attrName = mRenderer->classAttribute();
int idx = cboGraduatedColumn->findText( attrName, Qt::MatchExactly );
cboGraduatedColumn->setCurrentIndex( idx >= 0 ? idx : 0 );
//connect(cboGraduatedColumn, SIGNAL(currentIndexChanged(int)), this, SLOT(graduatedColumnChanged()));
connect( cboGraduatedColumn, SIGNAL( currentIndexChanged( int ) ), this, SLOT( graduatedColumnChanged() ) );

// set source symbol
if ( mRenderer->sourceSymbol() )
@@ -134,6 +135,11 @@ void QgsGraduatedSymbolRendererV2Widget::populateColumns()
}
}

void QgsGraduatedSymbolRendererV2Widget::graduatedColumnChanged()
{
mRenderer->setClassAttribute( cboGraduatedColumn->currentText() );
}


void QgsGraduatedSymbolRendererV2Widget::populateColorRamps()
{
@@ -23,6 +23,7 @@ class GUI_EXPORT QgsGraduatedSymbolRendererV2Widget : public QgsRendererV2Widget

public slots:
void changeGraduatedSymbol();
void graduatedColumnChanged();
void classifyGraduated();
void rangesDoubleClicked( const QModelIndex & idx );
void rangesClicked( const QModelIndex & idx );

0 comments on commit 1b575f1

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