summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2025-01-04 18:55:04 +0300
committerGeorge Hazan <george.hazan@gmail.com>2025-01-04 18:55:04 +0300
commite66cc6f92811270531993019b25ae546a70362e9 (patch)
treeaf7a816c5209ea8fedf1becff751b953bab727aa
parent6efe10975af20be0ae7bd03372796124007d2558 (diff)
fixes #4827 (NewStory: дерево в истории не перерисовывается на лету)
-rw-r--r--plugins/NewStory/src/history.h1
-rw-r--r--plugins/NewStory/src/history_control.cpp3
-rw-r--r--plugins/NewStory/src/history_dlg.cpp5
3 files changed, 9 insertions, 0 deletions
diff --git a/plugins/NewStory/src/history.h b/plugins/NewStory/src/history.h
index f332a252cf..e83b8c69ec 100644
--- a/plugins/NewStory/src/history.h
+++ b/plugins/NewStory/src/history.h
@@ -30,6 +30,7 @@ enum
UM_BOOKMARKS = WM_USER + 0x661,
UM_LOCATETIME = WM_USER + 0x662,
+ UM_UPDATE_WINDOW = WM_USER + 0x663,
};
extern MWindowList g_hNewstoryWindows, g_hNewstoryLogs, g_hNewstoryHistLogs;
diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp
index 534febf153..d651658e94 100644
--- a/plugins/NewStory/src/history_control.cpp
+++ b/plugins/NewStory/src/history_control.cpp
@@ -416,6 +416,7 @@ void NewstoryListData::DeleteItems(void)
CDeleteEventsDlg dlg(m_hContact, nSelected, bIncoming);
if (IDOK == dlg.DoModal()) {
+ int iSaveCount = totalCount;
g_plugin.bDisableDelete = true;
int firstSel = -1, flags = 0;
@@ -437,6 +438,8 @@ void NewstoryListData::DeleteItems(void)
}
g_plugin.bDisableDelete = false;
+ if (iSaveCount != totalCount)
+ PostMessage(GetParent(m_hwnd), UM_UPDATE_WINDOW, 0, 0);
if (firstSel != -1) {
SetCaret(firstSel, false);
diff --git a/plugins/NewStory/src/history_dlg.cpp b/plugins/NewStory/src/history_dlg.cpp
index 6a7d508b73..3520e117c6 100644
--- a/plugins/NewStory/src/history_dlg.cpp
+++ b/plugins/NewStory/src/history_dlg.cpp
@@ -1159,6 +1159,11 @@ public:
if (auto *pItem = m_histCtrl->GetItem(wParam))
LocateDateTime(pItem->dbe.timestamp);
break;
+
+ case UM_UPDATE_WINDOW:
+ UpdateTitle();
+ BuildTimeTree();
+ break;
}
return CDlgBase::DlgProc(msg, wParam, lParam);