summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAleks Kissinger <aleks0@gmail.com>2018-10-09 16:19:48 +0200
committerAleks Kissinger <aleks0@gmail.com>2018-10-09 16:19:48 +0200
commit6ead01f547f14604e9cf999c146d0cbb59386735 (patch)
tree0f2aa040edc10a9e2345bc066819a8048df90ae2 /src
parent27521c4f1312a66dd3e196cd4f4912c8fe51695d (diff)
fixed bug when there are no styles2.0-RC1
Diffstat (limited to 'src')
-rw-r--r--src/data/stylelist.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/data/stylelist.cpp b/src/data/stylelist.cpp
index 14302c7..bc2ef37 100644
--- a/src/data/stylelist.cpp
+++ b/src/data/stylelist.cpp
@@ -51,7 +51,7 @@ void StyleList::removeNthStyle(int n)
void StyleList::clear()
{
int n = numInCategory();
- if (n > 0) {
+ if (n > 1) {
beginRemoveRows(QModelIndex(), 1, n - 1);
_styles.clear();
if (_edgeStyles) _styles << noneEdgeStyle;