Skip to content

Commit

Permalink
Fixed modification of rendering pass in symbol levels dialog, fixed c…
Browse files Browse the repository at this point in the history
…rash when using apply in vector layer props dialog.

git-svn-id: http://svn.osgeo.org/qgis/branches/symbology-ng-branch@11167 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Jul 24, 2009
1 parent 019e73f commit 92d7e23
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/symbology-ng/qgsrendererv2propertiesdialog.cpp
Expand Up @@ -109,8 +109,8 @@ QgsRendererV2PropertiesDialog::~QgsRendererV2PropertiesDialog()

void QgsRendererV2PropertiesDialog::apply()
{
mLayer->setRendererV2(mRenderer);
mRenderer = NULL;
// use clone of our temporary renderer
mLayer->setRendererV2( mRenderer->clone() );
}

void QgsRendererV2PropertiesDialog::onOK()
Expand Down
12 changes: 12 additions & 0 deletions src/gui/symbology-ng/qgssymbollevelsv2dialog.cpp
Expand Up @@ -47,6 +47,8 @@ QgsSymbolLevelsV2Dialog::QgsSymbolLevelsV2Dialog(QgsSymbolV2List symbols, bool u
setDefaultLevels();

populateTable();

connect(tableLevels, SIGNAL(cellChanged(int,int)), this, SLOT(renderingPassChanged(int,int)));
}

void QgsSymbolLevelsV2Dialog::populateTable()
Expand Down Expand Up @@ -94,3 +96,13 @@ bool QgsSymbolLevelsV2Dialog::usingLevels() const
{
return chkEnable->isChecked();
}

void QgsSymbolLevelsV2Dialog::renderingPassChanged(int row, int column)
{
if (row < 0 || row >= mSymbols.count())
return;
QgsSymbolV2* sym = mSymbols[row];
if (column < 0 || column >= sym->symbolLayerCount())
return;
sym->symbolLayer(column)->setRenderingPass( tableLevels->item(row, column)->text().toInt() );
}
2 changes: 2 additions & 0 deletions src/gui/symbology-ng/qgssymbollevelsv2dialog.h
Expand Up @@ -20,6 +20,8 @@ class QgsSymbolLevelsV2Dialog : public QDialog, private Ui::QgsSymbolLevelsV2Dia
public slots:
void updateUi();

void renderingPassChanged( int row, int column );

protected:
void populateTable();
void setDefaultLevels();
Expand Down

0 comments on commit 92d7e23

Please sign in to comment.