From 33fa85c712ad498aebb5c518fb7973fb40fcdf46 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 27 May 2016 19:13:19 +0000 Subject: - unneeded variable removed from clist_modern cache; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@16876 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/mir_app/src/clcutils.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/mir_app/src/clcutils.cpp b/src/mir_app/src/clcutils.cpp index 4530eb959d..aed2da5faf 100644 --- a/src/mir_app/src/clcutils.cpp +++ b/src/mir_app/src/clcutils.cpp @@ -492,21 +492,20 @@ static LRESULT CALLBACK RenameEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wPar void fnBeginRenameSelection(HWND hwnd, ClcData *dat) { - ClcContact *contact; - ClcGroup *group; - POINT pt; - KillTimer(hwnd, TIMERID_RENAME); ReleaseCapture(); dat->iHotTrack = -1; + + ClcGroup *group; + ClcContact *contact; dat->selection = cli.pfnGetRowByIndex(dat, dat->selection, &contact, &group); - if (dat->selection == -1) - return; - if (contact->type != CLCIT_CONTACT && contact->type != CLCIT_GROUP) + if (dat->selection == -1 || (contact->type != CLCIT_CONTACT && contact->type != CLCIT_GROUP)) return; RECT clRect; GetClientRect(hwnd, &clRect); + + POINT pt; cli.pfnCalcEipPosition(dat, contact, group, &pt); int h = cli.pfnGetRowHeight(dat, dat->selection); dat->hwndRenameEdit = CreateWindow(_T("EDIT"), contact->szText, WS_CHILD | WS_BORDER | ES_AUTOHSCROLL, pt.x, pt.y, clRect.right - pt.x, h, hwnd, NULL, cli.hInst, NULL); -- cgit v1.2.3