Commit 6d91fd8c authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

msi: Use the handle to the treeview item if the item text is not returned.

parent 56bfe297
...@@ -2055,7 +2055,8 @@ static UINT msi_dialog_seltree_handler( msi_dialog *dialog, ...@@ -2055,7 +2055,8 @@ static UINT msi_dialog_seltree_handler( msi_dialog *dialog,
LPNMTREEVIEWW tv = (LPNMTREEVIEWW)param; LPNMTREEVIEWW tv = (LPNMTREEVIEWW)param;
MSIRECORD *row, *rec; MSIRECORD *row, *rec;
MSIFOLDER *folder; MSIFOLDER *folder;
LPCWSTR dir; MSIFEATURE *feature;
LPCWSTR dir, title = NULL;
UINT r = ERROR_SUCCESS; UINT r = ERROR_SUCCESS;
static const WCHAR select[] = { static const WCHAR select[] = {
...@@ -2069,7 +2070,16 @@ static UINT msi_dialog_seltree_handler( msi_dialog *dialog, ...@@ -2069,7 +2070,16 @@ static UINT msi_dialog_seltree_handler( msi_dialog *dialog,
info->selected = tv->itemNew.hItem; info->selected = tv->itemNew.hItem;
row = MSI_QueryGetRecord( dialog->package->db, select, tv->itemNew.pszText ); if (!(tv->itemNew.mask & TVIF_TEXT))
{
feature = msi_seltree_feature_from_item( control->hwnd, tv->itemNew.hItem );
if (feature)
title = feature->Title;
}
else
title = tv->itemNew.pszText;
row = MSI_QueryGetRecord( dialog->package->db, select, title );
if (!row) if (!row)
return ERROR_FUNCTION_FAILED; return ERROR_FUNCTION_FAILED;
......
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