mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-06 00:07:29 -04:00
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
This commit is contained in:
parent
2285668315
commit
3ee70567a3
@ -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:
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user