diff options
author | George Hazan <george.hazan@gmail.com> | 2015-05-18 20:12:35 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-05-18 20:12:35 +0000 |
commit | a6c5851e94a5a604fcbe9e6adfa130a3c8066364 (patch) | |
tree | af322a211d635fc00eaf2d9cd75b40bc1e22e00f | |
parent | 032c5363fbcfe55fc4d32174fcd7ccec40c8bbe8 (diff) |
valid flag mask for moving tree items
git-svn-id: http://svn.miranda-ng.org/main/trunk@13685 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | src/mir_core/src/ui_utils.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/mir_core/src/ui_utils.cpp b/src/mir_core/src/ui_utils.cpp index e2270d0fcb..bc937f0d29 100644 --- a/src/mir_core/src/ui_utils.cpp +++ b/src/mir_core/src/ui_utils.cpp @@ -1381,12 +1381,6 @@ void CCtrlTreeView::OnInit() HTREEITEM CCtrlTreeView::MoveItemAbove(HTREEITEM hItem, HTREEITEM hInsertAfter)
{
- TVITEMEX tvi = { 0 };
- tvi.mask = TVIF_HANDLE | TVIF_PARAM | TVIF_IMAGE;
- tvi.hItem = hItem;
- if (!GetItem(&tvi))
- return NULL;
-
if (hItem == NULL || hInsertAfter == NULL)
return NULL;
@@ -1395,11 +1389,10 @@ HTREEITEM CCtrlTreeView::MoveItemAbove(HTREEITEM hItem, HTREEITEM hInsertAfter) TCHAR name[128];
TVINSERTSTRUCT tvis = { 0 };
- tvis.itemex.mask = TVIF_HANDLE | TVIF_PARAM | TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
+ tvis.itemex.mask = (UINT)-1;
tvis.itemex.pszText = name;
tvis.itemex.cchTextMax = SIZEOF(name);
tvis.itemex.hItem = hItem;
- tvis.itemex.iImage = tvis.itemex.iSelectedImage = tvi.iImage;
if (!GetItem(&tvis.itemex))
return NULL;
@@ -1412,6 +1405,7 @@ HTREEITEM CCtrlTreeView::MoveItemAbove(HTREEITEM hItem, HTREEITEM hInsertAfter) // now current item contain lParam = 0 we can delete it. the memory will be kept.
DeleteItem(hItem);
+ tvis.itemex.stateMask = tvis.itemex.state;
tvis.itemex.lParam = saveOldData;
tvis.hParent = NULL;
tvis.hInsertAfter = hInsertAfter;
|