Skip to content

Commit

Permalink
Applied patch from #2285 by Mark Baas.
Browse files Browse the repository at this point in the history
Thanks for contributing!


git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12480 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Dec 15, 2009
1 parent 5257ae3 commit 6d0b492
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ Anita Graser
Richard Duivenvoorde
Alexander Bruy
Andres Manz
Mark Baas
10 changes: 10 additions & 0 deletions src/gui/symbology-ng/qgscategorizedsymbolrendererv2widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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 changes: 2 additions & 0 deletions src/gui/symbology-ng/qgscategorizedsymbolrendererv2widget.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define QGSCATEGORIZEDSYMBOLRENDERERV2WIDGET_H

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

class QgsCategorizedSymbolRendererV2;

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

protected:

Expand Down

0 comments on commit 6d0b492

Please sign in to comment.