summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/msgdlgutils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TabSRMM/src/msgdlgutils.cpp')
-rw-r--r--plugins/TabSRMM/src/msgdlgutils.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp
index 584854f756..46f1a0e2a4 100644
--- a/plugins/TabSRMM/src/msgdlgutils.cpp
+++ b/plugins/TabSRMM/src/msgdlgutils.cpp
@@ -614,18 +614,17 @@ bool TSAPI GetAvatarVisibility(HWND hwndDlg, TWindowData *dat)
case 3: // on, if present
case 1:
HBITMAP hbm = (dat->ace && !(dat->ace->dwFlags & AVS_HIDEONCLIST)) ? dat->ace->hbmPic : 0;
-
- if (!dat->hwndContactPic)
- dat->hwndContactPic = CreateWindowEx(WS_EX_TOPMOST, AVATAR_CONTROL_CLASS, _T(""), WS_VISIBLE | WS_CHILD, 1, 1, 1, 1, GetDlgItem(hwndDlg, IDC_CONTACTPIC), (HMENU)0, NULL, NULL);
-
dat->bShowAvatar = (hbm && hbm != PluginConfig.g_hbmUnknown);
break;
}
- if (dat->bShowAvatar)
+ if (dat->bShowAvatar) {
+ if (!dat->hwndContactPic)
+ dat->hwndContactPic = CreateWindowEx(WS_EX_TOPMOST, AVATAR_CONTROL_CLASS, _T(""), WS_VISIBLE | WS_CHILD, 1, 1, 1, 1, GetDlgItem(hwndDlg, IDC_CONTACTPIC), (HMENU)0, NULL, NULL);
+
dat->bShowAvatar = hideOverride == 0 ? 0 : dat->bShowAvatar;
- else
- dat->bShowAvatar = hideOverride == 1 ? 1 : dat->bShowAvatar;
+ }
+ else dat->bShowAvatar = hideOverride == 1 ? 1 : dat->bShowAvatar;
// reloads avatars
if (dat->hwndPanelPic) { // shows contact or user picture, depending on panel visibility