From 0489bed8751d89c37ee7a3eb08cc8aa80b3524a0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 23 Jan 2019 17:52:51 +0300 Subject: fixes #1763 (ICQ: cannot enter ICQ details if another ICQ account has been removed in this session) --- src/mir_app/src/proto_opts.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/mir_app') diff --git a/src/mir_app/src/proto_opts.cpp b/src/mir_app/src/proto_opts.cpp index e8bb77f5ea..ba38cee3b9 100644 --- a/src/mir_app/src/proto_opts.cpp +++ b/src/mir_app/src/proto_opts.cpp @@ -186,7 +186,7 @@ class CAccountManagerDlg : public CDlgBase { int curSel = m_accList.GetCurSel(); if (curSel != LB_ERR) { - PROTOACCOUNT *pa = (PROTOACCOUNT *)m_accList.GetItemData(curSel); + PROTOACCOUNT *pa = (PROTOACCOUNT*)m_accList.GetItemData(curSel); if (pa) { m_btnEdit.Enable(!pa->bOldProto && !pa->bDynDisabled); m_btnRemove.Enable(true); @@ -194,7 +194,7 @@ class CAccountManagerDlg : public CDlgBase m_btnOptions.Enable(pa->ppro != nullptr); if (m_iSelected >= 0) { - PROTOACCOUNT *pa_old = (PROTOACCOUNT *)m_accList.GetItemData(m_iSelected); + PROTOACCOUNT *pa_old = (PROTOACCOUNT*)m_accList.GetItemData(m_iSelected); if (pa_old && pa_old != pa && pa_old->hwndAccMgrUI) ShowWindow(pa_old->hwndAccMgrUI, SW_HIDE); } @@ -489,8 +489,10 @@ public: void OnAdd(CCtrlButton*) { - if (IDOK == CAccountFormDlg(this, PRAC_ADDED, nullptr).DoModal()) + if (IDOK == CAccountFormDlg(this, PRAC_ADDED, nullptr).DoModal()) { + m_iPrevSel = -1; Refresh(); + } } void OnEdit(CCtrlButton*) -- cgit v1.2.3