@@ -632,7 +632,7 @@ void AssetListViewModel::DoUpdateButtons()
632
632
bool bHasUnofficial = false ;
633
633
bool bHasCore = false ;
634
634
bool bHasLocal = false ;
635
- bool bHasRichPresenceSelection = false ;
635
+ gsl::index nRichPresenceSelectionIndex = - 1 ;
636
636
bool bHasNonRichPresenceSelection = false ;
637
637
638
638
const bool bGameLoaded = (GetGameId () != 0 );
@@ -711,7 +711,7 @@ void AssetListViewModel::DoUpdateButtons()
711
711
switch (pItem->GetType ())
712
712
{
713
713
case ra::data::models::AssetType::RichPresence:
714
- bHasRichPresenceSelection = true ;
714
+ nRichPresenceSelectionIndex = i ;
715
715
break ;
716
716
default :
717
717
bHasNonRichPresenceSelection = true ;
@@ -739,7 +739,7 @@ void AssetListViewModel::DoUpdateButtons()
739
739
}
740
740
}
741
741
742
- if (bHasRichPresenceSelection )
742
+ if (nRichPresenceSelectionIndex != - 1 )
743
743
{
744
744
SetValue (CanCreateProperty, true );
745
745
SetValue (CanCloneProperty, false );
@@ -758,7 +758,7 @@ void AssetListViewModel::DoUpdateButtons()
758
758
std::vector<AssetSummaryViewModel> vSelectedAssets;
759
759
SetValue (CanRevertProperty,
760
760
(!bHasNonRichPresenceSelection &&
761
- m_vFilteredAssets.GetItemAt (0 )->GetCategory () == ra::data::models::AssetCategory::Core));
761
+ m_vFilteredAssets.GetItemAt (nRichPresenceSelectionIndex )->GetCategory () == ra::data::models::AssetCategory::Core));
762
762
763
763
return ;
764
764
}
0 commit comments