diff options
author | Mataes <mataes2007@gmail.com> | 2020-05-06 22:51:26 +0300 |
---|---|---|
committer | Mataes <mataes2007@gmail.com> | 2020-05-06 22:51:26 +0300 |
commit | 47e3d1ccb568da7bc7c4e0de340e6dad508bfe13 (patch) | |
tree | 8b4754b13d56742a1e6456efff8bcbda08cbf7a6 /plugins/NewStory/src | |
parent | c2bf1d5e020478529286f488ae6b304a0b41de6b (diff) |
newstory: clear time tree after deleting
Diffstat (limited to 'plugins/NewStory/src')
-rw-r--r-- | plugins/NewStory/src/history.cpp | 4 |
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; |