Skip to content
Permalink
Browse files

[FEATURE] Add "All" tab to style manager

This allows you to see ALL the symbols/ramps matching the current
group/tag/filter. It makes it easier to manage groups which consist
of both markers/lines and fills.
  • Loading branch information
nyalldawson committed Jan 14, 2019
1 parent cd96ecd commit 180bb6a43eda8ac2ee7b0e594cf39cbe52547bf1
Showing with 23 additions and 15 deletions.
  1. +5 −5 src/gui/symbology/qgsstylemanagerdialog.cpp
  2. +18 −10 src/ui/qgsstylemanagerdialogbase.ui
@@ -357,7 +357,7 @@ void QgsStyleManagerDialog::tabItemType_currentChanged( int )

mModel->setEntityFilter( isSymbol ? QgsStyle::SymbolEntity : QgsStyle::ColorrampEntity );
mModel->setEntityFilterEnabled( true );
mModel->setSymbolTypeFilterEnabled( isSymbol );
mModel->setSymbolTypeFilterEnabled( isSymbol && tabItemType->currentIndex() > 0 );
mModel->setSymbolType( static_cast< QgsSymbol::SymbolType >( currentItemType() ) );

populateList();
@@ -385,13 +385,13 @@ int QgsStyleManagerDialog::currentItemType()
{
switch ( tabItemType->currentIndex() )
{
case 0:
return QgsSymbol::Marker;
case 1:
return QgsSymbol::Line;
return QgsSymbol::Marker;
case 2:
return QgsSymbol::Fill;
return QgsSymbol::Line;
case 3:
return QgsSymbol::Fill;
case 4:
return 3;
default:
return 0;
@@ -202,13 +202,6 @@
</property>
</spacer>
</item>
<item>
<widget class="QgsFilterLineEdit" name="searchBox">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<property name="spacing">
@@ -265,6 +258,13 @@
</item>
</layout>
</item>
<item>
<widget class="QgsFilterLineEdit" name="searchBox">
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="0">
@@ -274,9 +274,17 @@
</property>
<item>
<widget class="QTabWidget" name="tabItemType">
<property name="currentIndex">
<number>4</number>
</property>
<property name="documentMode">
<bool>true</bool>
</property>
<widget class="QWidget" name="tabAll">
<attribute name="title">
<string>All</string>
</attribute>
</widget>
<widget class="QWidget" name="tabMarker">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Ignored">
@@ -334,15 +342,15 @@
<normaloff>:/images/themes/default/styleicons/color.svg</normaloff>:/images/themes/default/styleicons/color.svg</iconset>
</attribute>
<attribute name="title">
<string>Color ramp</string>
<string>Color Ramp</string>
</attribute>
</widget>
</widget>
</item>
<item>
<widget class="QStackedWidget" name="mSymbolViewStackedWidget">
<property name="currentIndex">
<number>0</number>
<number>1</number>
</property>
<widget class="QWidget" name="page">
<layout class="QVBoxLayout" name="verticalLayout_2">
@@ -617,9 +625,9 @@
<tabstop>btnAddItem</tabstop>
<tabstop>btnRemoveItem</tabstop>
<tabstop>btnEditItem</tabstop>
<tabstop>searchBox</tabstop>
<tabstop>mButtonIconView</tabstop>
<tabstop>mButtonListView</tabstop>
<tabstop>searchBox</tabstop>
</tabstops>
<resources>
<include location="../../images/images.qrc"/>

0 comments on commit 180bb6a

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