From 6ead01f547f14604e9cf999c146d0cbb59386735 Mon Sep 17 00:00:00 2001 From: Aleks Kissinger Date: Tue, 9 Oct 2018 16:19:48 +0200 Subject: fixed bug when there are no styles --- src/data/stylelist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/data') 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; -- cgit v1.2.3