Author: ekohl Date: Tue Dec 22 18:00:45 2009 New Revision: 44716
URL: http://svn.reactos.org/svn/reactos?rev=44716&view=rev Log: If the user doubleclicked a treeview item, make sure the doubleclicked item has already been selected. Otherwise the user can expand or collapse a treeview iten and a previously selected item get opened. That's not what we want.
Modified: trunk/reactos/base/applications/mscutils/devmgmt/mainwnd.c
Modified: trunk/reactos/base/applications/mscutils/devmgmt/mainwnd.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils/... ============================================================================== --- trunk/reactos/base/applications/mscutils/devmgmt/mainwnd.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/mscutils/devmgmt/mainwnd.c [iso-8859-1] Tue Dec 22 18:00:45 2009 @@ -342,12 +342,21 @@ case NM_DBLCLK: { HTREEITEM hSelected = TreeView_GetSelection(Info->hTreeView); + TV_HITTESTINFO HitTest;
if (!TreeView_GetChild(Info->hTreeView, hSelected)) { - OpenPropSheet(Info->hTreeView, - hSelected); + if (GetCursorPos(&HitTest.pt) && + ScreenToClient(Info->hTreeView, &HitTest.pt)) + { + if (TreeView_HitTest(Info->hTreeView, &HitTest)) + { + if (HitTest.hItem == hSelected) + OpenPropSheet(Info->hTreeView, + hSelected); + } + } } } break;