Skip to content

Conversation

@paulcam206
Copy link
Member

Looks like a simple mistake in the conversion to cppwinrt (as vs. try_as). The converted version would throw instead of quietly skipping the check...

original

if (SUCCEEDED(spChild.As(&spWholeItemPanel)))
{
RETURN_IF_FAILED(spWholeItemPanel->IsTruncated(&isChildTruncated));
if (isChildTruncated)
{
// No need to continue the iteration
*childTruncated = true;
return S_OK;
}
}

converted

if (auto childAsWholeItemPanel = child.as<winrt::WholeItemsPanel>())
{
if (childAsWholeItemPanel.IsTruncated())
{
return true;
}
}

@paulcam206 paulcam206 enabled auto-merge (squash) February 28, 2024 22:56
@beervoley
Copy link
Contributor

#8841 - this will have to go in before this PR :)

@paulcam206 paulcam206 merged commit e36e499 into main Feb 29, 2024
@paulcam206 paulcam206 deleted the paulcam/fix-wholeitemspanel-exception branch February 29, 2024 21:08
paulcam206 added a commit that referenced this pull request Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants