Skip to content
Permalink
Browse files

Applied patch from #2285 by Mark Baas.

Thanks for contributing!


git-svn-id: http://svn.osgeo.org/qgis/trunk@12480 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder
wonder committed Dec 15, 2009
1 parent 2285668 commit 3ee70567a307bac7f24f5090bab731e59c3c29bf
@@ -41,3 +41,4 @@ Anita Graser
Richard Duivenvoorde
Alexander Bruy
Andres Manz
Mark Baas
@@ -61,6 +61,7 @@ QgsCategorizedSymbolRendererV2Widget::QgsCategorizedSymbolRendererV2Widget( QgsV
connect( btnAddCategories, SIGNAL( clicked() ), this, SLOT( addCategories() ) );
connect( btnDeleteCategory, SIGNAL( clicked() ), this, SLOT( deleteCategory() ) );
connect( btnDeleteAllCategories, SIGNAL( clicked() ), this, SLOT( deleteAllCategories() ) );
connect( m, SIGNAL( itemChanged( QStandardItem * ) ), this, SLOT( changeCurrentValue( QStandardItem * ) ) );

// update GUI from renderer
updateUiFromRenderer();
@@ -330,3 +331,12 @@ void QgsCategorizedSymbolRendererV2Widget::deleteAllCategories()
populateCategories();
}

void QgsCategorizedSymbolRendererV2Widget::changeCurrentValue( QStandardItem * item )
{
if ( item->column() == 1 )
{
QString label = item->text();
int idx = item->row();
mRenderer->updateCategoryLabel( idx, label );
}
}
@@ -2,6 +2,7 @@
#define QGSCATEGORIZEDSYMBOLRENDERERV2WIDGET_H

#include "qgsrendererv2widget.h"
#include <QStandardItem>

class QgsCategorizedSymbolRendererV2;

@@ -27,6 +28,7 @@ class GUI_EXPORT QgsCategorizedSymbolRendererV2Widget : public QgsRendererV2Widg
void addCategories();
void deleteCategory();
void deleteAllCategories();
void changeCurrentValue( QStandardItem * item );

protected:

0 comments on commit 3ee7056

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