Commit 0406a08c authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

Clean up the drawing code after a label update. There were problems if

the new label is shorter that the old label fragments of the old label were left drawn.
parent 38db0980
...@@ -2934,6 +2934,8 @@ TREEVIEW_EndEditLabelNow (HWND hwnd, WPARAM wParam, LPARAM lParam) ...@@ -2934,6 +2934,8 @@ TREEVIEW_EndEditLabelNow (HWND hwnd, WPARAM wParam, LPARAM lParam)
BOOL bRevert = (BOOL)wParam; BOOL bRevert = (BOOL)wParam;
BOOL bReturn = ! bRevert; BOOL bReturn = ! bRevert;
NMTVDISPINFOA tvdi; NMTVDISPINFOA tvdi;
RECT itemRect;
if ( ! (BOOL)wParam ) /* wParam is set to true to cancel the edition */ if ( ! (BOOL)wParam ) /* wParam is set to true to cancel the edition */
{ {
...@@ -3024,12 +3026,16 @@ TREEVIEW_EndEditLabelNow (HWND hwnd, WPARAM wParam, LPARAM lParam) ...@@ -3024,12 +3026,16 @@ TREEVIEW_EndEditLabelNow (HWND hwnd, WPARAM wParam, LPARAM lParam)
(LPARAM)&tvdi); (LPARAM)&tvdi);
} }
} }
}
ShowWindow(infoPtr->hwndEdit, SW_HIDE); ShowWindow(infoPtr->hwndEdit, SW_HIDE);
EnableWindow(infoPtr->hwndEdit, FALSE); EnableWindow(infoPtr->hwndEdit, FALSE);
infoPtr->editItem = 0; /* update the window to eliminate fragments and the like */
} TreeView_GetItemRect(hwnd,infoPtr->editItem,&itemRect,FALSE);
RedrawWindow(hwnd,&itemRect,NULL,RDW_ERASE|RDW_INVALIDATE|RDW_UPDATENOW);
infoPtr->editItem = 0;
return bReturn; return bReturn;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment