From a598ca4e2fbdfecddca6e06afdf0556da1387ccc Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 9 Mar 2014 20:01:57 +0000 Subject: fix for 'Set as default sub' menu item git-svn-id: http://svn.miranda-ng.org/main/trunk@8525 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/metacontacts/meta_menu.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/modules/metacontacts/meta_menu.cpp b/src/modules/metacontacts/meta_menu.cpp index cd71119ba5..8524c1cdf0 100644 --- a/src/modules/metacontacts/meta_menu.cpp +++ b/src/modules/metacontacts/meta_menu.cpp @@ -218,13 +218,13 @@ INT_PTR Meta_Delete(WPARAM hContact, LPARAM bSkipQuestion) (This means the function has been called via the contact menu). */ -INT_PTR Meta_Default(WPARAM hMeta, LPARAM wParam) +INT_PTR Meta_Default(WPARAM hSub, LPARAM wParam) { - DBCachedContact *cc = CheckMeta(hMeta); - if (cc) { - cc->nDefault = Meta_GetContactNumber(cc, wParam); + DBCachedContact *cc = currDb->m_cache->GetCachedContact(db_mc_getMeta(hSub)); + if (cc && cc->IsMeta()) { + cc->nDefault = Meta_GetContactNumber(cc, hSub); currDb->MetaSetDefault(cc); - NotifyEventHooks(hEventDefaultChanged, hMeta, wParam); + NotifyEventHooks(hEventDefaultChanged, cc->contactID, hSub); } return 0; } -- cgit v1.2.3