summaryrefslogtreecommitdiff
path: root/plugins/NewStory/src
diff options
context:
space:
mode:
authorMataes <mataes2007@gmail.com>2020-05-06 22:51:26 +0300
committerMataes <mataes2007@gmail.com>2020-05-06 22:51:26 +0300
commit47e3d1ccb568da7bc7c4e0de340e6dad508bfe13 (patch)
tree8b4754b13d56742a1e6456efff8bcbda08cbf7a6 /plugins/NewStory/src
parentc2bf1d5e020478529286f488ae6b304a0b41de6b (diff)
newstory: clear time tree after deleting
Diffstat (limited to 'plugins/NewStory/src')
-rw-r--r--plugins/NewStory/src/history.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/NewStory/src/history.cpp b/plugins/NewStory/src/history.cpp
index ea0b5be5bd..8f825b3027 100644
--- a/plugins/NewStory/src/history.cpp
+++ b/plugins/NewStory/src/history.cpp
@@ -343,6 +343,10 @@ class CHistoryDlg : public CDlgBase
auto *pArray = (HistoryArray *)m_histControl.SendMsg(NSM_GETARRAY, 0, 0);
int numItems = pArray->getCount();
+ if (!numItems) {
+ m_timeTree.DeleteAllItems();
+ return;
+ }
int CurYear = 0, CurMonth = 0, CurDay = 0, PrevYear = -1, PrevMonth = -1, PrevDay = -1;
HTREEITEM hCurYear = 0, hCurMonth = 0, hCurDay = 0;