summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-05-27 19:13:19 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-05-27 19:13:19 +0000
commit33fa85c712ad498aebb5c518fb7973fb40fcdf46 (patch)
tree94683fe70a00fa1d9f9d205c4e1fcedcc0a72569 /src
parent51fa76a3b307fb8ddaf2e086723489d1b2d2655d (diff)
- 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
Diffstat (limited to 'src')
-rw-r--r--src/mir_app/src/clcutils.cpp13
1 files changed, 6 insertions, 7 deletions
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);