summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-12-24 12:10:18 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-12-24 12:10:18 +0300
commitebacc2825d5beb3c3fe4d7ce8acd9290989415ae (patch)
tree27d63d00a0a3de09de996798f2a290fda42fd8ca /src
parentcbdf4e985f31329a131e2b5cd1ba10051373bf2a (diff)
fixes #4076 (StdMsg: при скрытии поля ввода оно скрывается навсегда)
Diffstat (limited to 'src')
-rw-r--r--src/core/stdmsg/src/msgdialog.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp
index 91c7939d29..eee20e3e00 100644
--- a/src/core/stdmsg/src/msgdialog.cpp
+++ b/src/core/stdmsg/src/msgdialog.cpp
@@ -115,7 +115,11 @@ bool CMsgDialog::OnInitDialog()
m_iSplitterY = 0;
m_splitterY.Disable();
}
- else m_iSplitterY = g_plugin.getDword(g_plugin.bSavePerContact ? m_hContact : 0, "splitterPos", m_minEditInit.bottom - m_minEditInit.top);
+ else {
+ m_iSplitterY = g_plugin.getDword(g_plugin.bSavePerContact ? m_hContact : 0, "splitterPos");
+ if (m_iSplitterY == 0)
+ m_iSplitterY = m_minEditInit.bottom - m_minEditInit.top;
+ }
// avatar stuff
m_avatar.Disable();
@@ -223,7 +227,8 @@ void CMsgDialog::OnDestroy()
m_cmdList.destroy();
MCONTACT hContact = (g_plugin.bSavePerContact) ? m_hContact : 0;
- g_plugin.setDword(hContact ? m_hContact : 0, "splitterPos", m_iSplitterY);
+ if (!m_bReadOnly)
+ g_plugin.setDword(hContact ? m_hContact : 0, "splitterPos", m_iSplitterY);
if (m_hFont) {
DeleteObject(m_hFont);