diff options
-rw-r--r-- | framework/domain/selector.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/framework/domain/selector.h b/framework/domain/selector.h index fedb91d2..358eaa9a 100644 --- a/framework/domain/selector.h +++ b/framework/domain/selector.h | |||
@@ -37,7 +37,11 @@ public: | |||
37 | void setCurrentIndex(int i) { | 37 | void setCurrentIndex(int i) { |
38 | mCurrentIndex = i; | 38 | mCurrentIndex = i; |
39 | Q_ASSERT(mModel); | 39 | Q_ASSERT(mModel); |
40 | setCurrent(mModel->index(mCurrentIndex, 0)); | 40 | if (i >= 0) { |
41 | setCurrent(mModel->index(mCurrentIndex, 0)); | ||
42 | } else { | ||
43 | setCurrent(QModelIndex()); | ||
44 | } | ||
41 | } | 45 | } |
42 | 46 | ||
43 | void reapplyCurrentIndex(); | 47 | void reapplyCurrentIndex(); |