diff options
author | George Hazan <george.hazan@gmail.com> | 2023-11-08 12:19:46 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-11-08 12:19:50 +0300 |
commit | 58e3971946c2f7e5f8d3663ae988d1949bedfedd (patch) | |
tree | d495232a426f08954d14d00b1b50359b33942c61 /src/mir_app | |
parent | 46ed45d0429a0e662799dec676f163eaa7d82a28 (diff) |
fixes #3878 (Менеджер учётных записей корёжит при удалении учёток)
Diffstat (limited to 'src/mir_app')
-rw-r--r-- | src/mir_app/src/proto_opts.cpp | 19 | ||||
-rw-r--r-- | src/mir_app/src/proto_ui.cpp | 1 |
2 files changed, 13 insertions, 7 deletions
diff --git a/src/mir_app/src/proto_opts.cpp b/src/mir_app/src/proto_opts.cpp index 7b8bb41d36..1bb3365603 100644 --- a/src/mir_app/src/proto_opts.cpp +++ b/src/mir_app/src/proto_opts.cpp @@ -124,16 +124,16 @@ class CAccountListCtrl : public CCtrlListBox {
friend class CAccountManagerDlg;
- int m_iItem;
+ int m_iItem = -1;
RECT m_rcCheck;
- HWND m_hwndEdit;
+ HWND m_hwndEdit = nullptr;
public:
CAccountListCtrl(CDlgBase *dlg, int ctrlId) :
- CCtrlListBox(dlg, ctrlId),
- m_iItem(-1),
- m_hwndEdit(nullptr)
- {}
+ CCtrlListBox(dlg, ctrlId)
+ {
+ memset(&m_rcCheck, 0, sizeof(m_rcCheck));
+ }
__forceinline CAccountManagerDlg* PARENT() { return (CAccountManagerDlg*)m_parentWnd; }
@@ -554,8 +554,13 @@ public: Refresh();
- m_accList.SetCurSel((idx >= m_accList.GetCount()) ? idx - 1 : idx);
+ if (idx >= m_accList.GetCount())
+ idx--;
+ m_accList.SetCurSel(idx);
+
+ m_iPrevSel = -1;
UpdateAccountInfo();
+ SelectItem(idx);
m_accList.Enable();
m_btnAdd.Enable();
diff --git a/src/mir_app/src/proto_ui.cpp b/src/mir_app/src/proto_ui.cpp index 13319b83a1..be0cd6f9b3 100644 --- a/src/mir_app/src/proto_ui.cpp +++ b/src/mir_app/src/proto_ui.cpp @@ -109,6 +109,7 @@ INT_PTR CProtoIntDlgBase::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) return CSuper::DlgProc(msg, wParam, lParam);
}
+
void CProtoIntDlgBase::UpdateStatusBar()
{
SIZE sz;
|