Skip to content
Permalink
Browse files

tweaks for symbolslist widget filtering

  • Loading branch information
tecoholic committed Aug 4, 2012
1 parent 86143e9 commit cbd71fa0cee7b91ea2536127ed036be51e62b9e4
@@ -195,7 +195,6 @@ void QgsStyleV2ManagerDialog::populateSymbols( QStringList symbolNames, bool che
QStandardItemModel* model = qobject_cast<QStandardItemModel*>( listItems->model() );
model->clear();

// QStringList symbolNames = mStyle->symbolNames();
int type = currentItemType();

for ( int i = 0; i < symbolNames.count(); ++i )
@@ -297,8 +297,17 @@ void QgsSymbolsListWidget::setSymbolFromStyle( const QModelIndex & index )

void QgsSymbolsListWidget::on_groupsCombo_currentIndexChanged( const QString &text )
{
int groupid = mStyle->groupId( text );
QStringList symbols = mStyle->symbolsOfGroup( SymbolEntity, groupid );
QStringList symbols;
// List all symbols when empty list item is selected
if ( text.isEmpty() )
{
symbols = mStyle->symbolNames();
}
else
{
int groupid = mStyle->groupId( text );
symbols = mStyle->symbolsOfGroup( SymbolEntity, groupid );
}
populateSymbols( symbols );
}

@@ -111,7 +111,7 @@
</sizepolicy>
</property>
<property name="currentIndex">
<number>2</number>
<number>0</number>
</property>
<property name="iconSize">
<size>
@@ -252,6 +252,18 @@
</item>
<item>
<widget class="QComboBox" name="groupsCombo">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="editable">
<bool>true</bool>
</property>

0 comments on commit cbd71fa

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