Skip to content
Snippets Groups Projects
Commit 0406a08c authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard
Browse files

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
No related branches found
No related tags found
No related merge requests found
......@@ -2934,6 +2934,8 @@ TREEVIEW_EndEditLabelNow (HWND hwnd, WPARAM wParam, LPARAM lParam)
BOOL bRevert = (BOOL)wParam;
BOOL bReturn = ! bRevert;
NMTVDISPINFOA tvdi;
RECT itemRect;
if ( ! (BOOL)wParam ) /* wParam is set to true to cancel the edition */
{
......@@ -3024,12 +3026,16 @@ TREEVIEW_EndEditLabelNow (HWND hwnd, WPARAM wParam, LPARAM lParam)
(LPARAM)&tvdi);
}
}
}
ShowWindow(infoPtr->hwndEdit, SW_HIDE);
EnableWindow(infoPtr->hwndEdit, FALSE);
ShowWindow(infoPtr->hwndEdit, SW_HIDE);
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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment