Skip to content
Permalink
Browse files

Refresh the style manager only when a change has been done to it.

git-svn-id: http://svn.osgeo.org/qgis/trunk@14604 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder
wonder committed Nov 13, 2010
1 parent 70511c9 commit 12c7f2cc54711cc4199c8b079037a1f8c3e8a919
Showing with 21 additions and 11 deletions.
  1. +21 −11 src/gui/symbology-ng/qgsstylev2managerdialog.cpp
@@ -168,21 +168,25 @@ QString QgsStyleV2ManagerDialog::currentItemName()

void QgsStyleV2ManagerDialog::addItem()
{
bool changed = false;
if ( currentItemType() < 3 )
{
addSymbol();
changed = addSymbol();
}
else if ( currentItemType() == 3 )
{
addColorRamp();
changed = addColorRamp();
}
else
{
Q_ASSERT( 0 && "not implemented" );
}

populateList();
populateTypes();
if ( changed )
{
populateList();
populateTypes();
}
}

bool QgsStyleV2ManagerDialog::addSymbol()
@@ -303,20 +307,22 @@ bool QgsStyleV2ManagerDialog::addColorRamp()

void QgsStyleV2ManagerDialog::editItem()
{
bool changed = false;
if ( currentItemType() < 3 )
{
editSymbol();
changed = editSymbol();
}
else if ( currentItemType() == 3 )
{
editColorRamp();
changed = editColorRamp();
}
else
{
Q_ASSERT( 0 && "not implemented" );
}

populateList();
if ( changed )
populateList();
}

bool QgsStyleV2ManagerDialog::editSymbol()
@@ -392,21 +398,25 @@ bool QgsStyleV2ManagerDialog::editColorRamp()

void QgsStyleV2ManagerDialog::removeItem()
{
bool changed = false;
if ( currentItemType() < 3 )
{
removeSymbol();
changed = removeSymbol();
}
else if ( currentItemType() == 3 )
{
removeColorRamp();
changed = removeColorRamp();
}
else
{
Q_ASSERT( 0 && "not implemented" );
}

populateList();
populateTypes();
if ( changed )
{
populateList();
populateTypes();
}
}

bool QgsStyleV2ManagerDialog::removeSymbol()

0 comments on commit 12c7f2c

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