Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelwgn committed Oct 15, 2019
1 parent 469d214 commit d9d3bcc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions dev/NavigationView/NavigationView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,10 @@ void NavigationView::CreateAndHookEventsToSettings(std::wstring_view settingsNam

if (shouldSelectSetting)
{
auto scopeGuard = gsl::finally([this]()
{
m_shouldIgnoreNextSelectionChange = false;
});
m_shouldIgnoreNextSelectionChange = true;
SetSelectedItemAndExpectItemInvokeWhenSelectionChangedIfNotInvokedFromAPI(nullptr);
}
Expand Down Expand Up @@ -427,6 +431,10 @@ void NavigationView::CreateAndHookEventsToSettings(std::wstring_view settingsNam

if (shouldSelectSetting)
{
auto scopeGuard = gsl::finally([this]()
{
m_shouldIgnoreNextSelectionChange = false;
});
m_shouldIgnoreNextSelectionChange = true;
SetSelectedItemAndExpectItemInvokeWhenSelectionChangedIfNotInvokedFromAPI(m_settingsItem.get());
}
Expand Down

0 comments on commit d9d3bcc

Please sign in to comment.