HaikuDepot: Sync the selection between normal and featured list

This commit is contained in:
Stephan Aßmus 2014-12-26 22:42:11 +01:00
parent b2843daed7
commit 1986ab9f31
1 changed files with 8 additions and 0 deletions

View File

@ -645,6 +645,11 @@ MainWindow::_AdoptModel()
fListLayout->SetVisibleItem((int32)0); fListLayout->SetVisibleItem((int32)0);
else else
fListLayout->SetVisibleItem((int32)1); fListLayout->SetVisibleItem((int32)1);
// Maintain selection
const PackageInfoRef& selectedPackage = fPackageInfoView->Package();
fFeaturedPackagesView->SelectPackage(selectedPackage);
fPackageListView->SelectPackage(selectedPackage);
} }
@ -652,8 +657,11 @@ void
MainWindow::_AdoptPackage(const PackageInfoRef& package) MainWindow::_AdoptPackage(const PackageInfoRef& package)
{ {
fPackageInfoView->SetPackage(package); fPackageInfoView->SetPackage(package);
if (fFeaturedPackagesView != NULL) if (fFeaturedPackagesView != NULL)
fFeaturedPackagesView->SelectPackage(package); fFeaturedPackagesView->SelectPackage(package);
if (fPackageListView != NULL)
fPackageListView->SelectPackage(package);
// Trigger asynchronous package population from the web-app // Trigger asynchronous package population from the web-app
{ {