From 1986ab9f319871507efe805fedcbec799f7cae86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Fri, 26 Dec 2014 22:42:11 +0100 Subject: [PATCH] HaikuDepot: Sync the selection between normal and featured list --- src/apps/haikudepot/ui/MainWindow.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/apps/haikudepot/ui/MainWindow.cpp b/src/apps/haikudepot/ui/MainWindow.cpp index 71e5e5e2f8..b507bee2d0 100644 --- a/src/apps/haikudepot/ui/MainWindow.cpp +++ b/src/apps/haikudepot/ui/MainWindow.cpp @@ -645,6 +645,11 @@ MainWindow::_AdoptModel() fListLayout->SetVisibleItem((int32)0); else 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) { fPackageInfoView->SetPackage(package); + if (fFeaturedPackagesView != NULL) fFeaturedPackagesView->SelectPackage(package); + if (fPackageListView != NULL) + fPackageListView->SelectPackage(package); // Trigger asynchronous package population from the web-app {