Skip to content
Permalink
Browse files

Fixed modification of rendering pass in symbol levels dialog, fixed c…

…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
wonder committed Jul 24, 2009
1 parent 019e73f commit 92d7e2329d81bb04500d23e788c522dc27ddb957
@@ -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()
@@ -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()
@@ -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() );
}
@@ -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();

0 comments on commit 92d7e23

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