From a68be84b7f85faf033691faaa4c27eccb1825eb7 Mon Sep 17 00:00:00 2001 From: Pieter van der Kloet Date: Tue, 3 May 2011 01:23:35 +0200 Subject: [PATCH] Re-implemented the profile combobox on the Play page --- apps/launcher/maindialog.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/launcher/maindialog.cpp b/apps/launcher/maindialog.cpp index d4f4b15006..d0ca35b611 100644 --- a/apps/launcher/maindialog.cpp +++ b/apps/launcher/maindialog.cpp @@ -99,6 +99,10 @@ void MainDialog::createPages() QString dataDir = mGameConfig->value("data").toString(); mDataFilesPage->setupDataFiles(dataDir); + // Set the combobox of the play page to imitate the comobox on the datafilespage + mPlayPage->mProfilesComboBox->setModel(mDataFilesPage->mProfilesComboBox->model()); + mPlayPage->mProfilesComboBox->setCurrentIndex(mDataFilesPage->mProfilesComboBox->currentIndex()); + // Add the pages to the stacked widget mPagesWidget->addWidget(mPlayPage); mPagesWidget->addWidget(mGraphicsPage); @@ -119,13 +123,13 @@ void MainDialog::changePage(QListWidgetItem *current, QListWidgetItem *previous) // The user switched from Data Files to Play if (previousPage == QString("Data Files") && currentPage == QString("Play")) { - //mPlayPage->mProfilesModel->setStringList(mDataFilesPage->mProfilesModel->stringList()); - //mPlayPage->mProfilesComboBox->setCurrentIndex(mDataFilesPage->mProfilesComboBox->currentIndex()); + mPlayPage->mProfilesComboBox->setCurrentIndex(mDataFilesPage->mProfilesComboBox->currentIndex()); + } // The user switched from Play to Data Files if (previousPage == QString("Play") && currentPage == QString("Data Files")) { - //mDataFilesPage->mProfilesComboBox->setCurrentIndex(mPlayPage->mProfilesComboBox->currentIndex()); + mDataFilesPage->mProfilesComboBox->setCurrentIndex(mPlayPage->mProfilesComboBox->currentIndex()); } }