[BUG_FIXED] (Author: Anton Vasiliev) Fix hanging problem while double-click on a project folder then (immediately) drag it.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@906 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2012-05-01 16:35:24 +00:00
parent 0e67b99240
commit 19808a632f

View File

@ -258,6 +258,8 @@ bool TreeView::dropItem()
bool TreeView::canBeDropped(HTREEITEM draggedItem, HTREEITEM targetItem) bool TreeView::canBeDropped(HTREEITEM draggedItem, HTREEITEM targetItem)
{ {
if (targetItem == NULL)
return false;
if (draggedItem == targetItem) if (draggedItem == targetItem)
return false; return false;
if (targetItem == TreeView_GetRoot(_hSelf)) if (targetItem == TreeView_GetRoot(_hSelf))
@ -275,6 +277,9 @@ bool TreeView::canBeDropped(HTREEITEM draggedItem, HTREEITEM targetItem)
bool TreeView::isDescendant(HTREEITEM targetItem, HTREEITEM draggedItem) bool TreeView::isDescendant(HTREEITEM targetItem, HTREEITEM draggedItem)
{ {
if (targetItem == NULL)
return false;
if (TreeView_GetRoot(_hSelf) == targetItem) if (TreeView_GetRoot(_hSelf) == targetItem)
return false; return false;