summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-08-09 12:39:42 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-08-09 12:39:42 +0300
commit49c1cd8e49395fdd10050c176df63a4c548deb87 (patch)
treedd8d5af698032cacde80eab075719e4cac3a0a73
parent4ec98ff6e266095378485cc6efc084333f006955 (diff)
fixes #3631 (NewStory: перестала работать прокрутка)
-rw-r--r--plugins/NewStory/src/history_control.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp
index 21ba39b3c4..342ba3d856 100644
--- a/plugins/NewStory/src/history_control.cpp
+++ b/plugins/NewStory/src/history_control.cpp
@@ -73,8 +73,6 @@ void NewstoryListData::OnTimer(CTimer *pTimer)
{
pTimer->Stop();
- scrollTopItem = totalCount;
- FixScrollPosition();
InvalidateRect(hwnd, 0, FALSE);
}
@@ -89,7 +87,7 @@ void NewstoryListData::AddSelection(int iFirst, int iLast)
if (auto *p = GetItem(i))
p->m_bSelected = true;
- ScheduleDraw();
+ ScrollBottom();
}
void NewstoryListData::BeginEditItem(int index, bool bReadOnly)
@@ -623,14 +621,14 @@ LRESULT CALLBACK NewstoryListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
data->totalCount = data->items.getCount();
}
data->hasData = true;
- data->ScheduleDraw();
+ data->ScrollBottom();
break;
case NSM_ADDCHATEVENT:
data->items.addChatEvent((SESSION_INFO *)wParam, (LOGINFO *)lParam);
data->totalCount++;
data->hasData = true;
- data->ScheduleDraw();
+ data->ScrollBottom();
break;
case NSM_ADDRESULTS:
@@ -638,7 +636,7 @@ LRESULT CALLBACK NewstoryListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
data->items.addResults(pResults);
data->totalCount = data->items.getCount();
data->hasData = true;
- data->ScheduleDraw();
+ data->ScrollBottom();
}
break;