mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-21 10:39:39 +00:00
Fixed a problem with the currentprofile not being set in the combobox
This commit is contained in:
parent
ba3e4330f2
commit
ee4a2d0a8d
1 changed files with 8 additions and 4 deletions
|
@ -119,7 +119,7 @@ DataFilesPage::DataFilesPage(QWidget *parent) : QWidget(parent)
|
||||||
connect(mPluginsModel, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&)), this, SLOT(resizeRows()));
|
connect(mPluginsModel, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&)), this, SLOT(resizeRows()));
|
||||||
|
|
||||||
//connect(mProfileComboBox, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(profileChanged(const QString&)));
|
//connect(mProfileComboBox, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(profileChanged(const QString&)));
|
||||||
connect(mProfilesComboBox, SIGNAL(textChanged(const QString&, const QString&)), this, SLOT(profileChanged(const QString&, const QString&)));
|
|
||||||
|
|
||||||
connect(mNewProfileButton, SIGNAL(pressed()), this, SLOT(newProfile()));
|
connect(mNewProfileButton, SIGNAL(pressed()), this, SLOT(newProfile()));
|
||||||
|
|
||||||
|
@ -274,10 +274,10 @@ void DataFilesPage::setupConfig()
|
||||||
mLauncherConfig->beginGroup("Profiles");
|
mLauncherConfig->beginGroup("Profiles");
|
||||||
QStringList profiles = mLauncherConfig->childGroups();
|
QStringList profiles = mLauncherConfig->childGroups();
|
||||||
|
|
||||||
/*if (profiles.isEmpty()) {
|
if (profiles.isEmpty()) {
|
||||||
// Add a default profile
|
// Add a default profile
|
||||||
profiles.append("Default");
|
profiles.append("Default");
|
||||||
}*/
|
}
|
||||||
|
|
||||||
//mProfilesModel->setStringList(profiles);
|
//mProfilesModel->setStringList(profiles);
|
||||||
mProfilesComboBox->addItems(profiles);
|
mProfilesComboBox->addItems(profiles);
|
||||||
|
@ -294,6 +294,10 @@ void DataFilesPage::setupConfig()
|
||||||
mProfilesComboBox->setCurrentIndex(mProfilesComboBox->findText(currentProfile));
|
mProfilesComboBox->setCurrentIndex(mProfilesComboBox->findText(currentProfile));
|
||||||
|
|
||||||
mLauncherConfig->endGroup();
|
mLauncherConfig->endGroup();
|
||||||
|
|
||||||
|
// Now we connect the combobox to do something if the profile changes
|
||||||
|
// This prevents strange behaviour while reading and appending the profiles
|
||||||
|
connect(mProfilesComboBox, SIGNAL(textChanged(const QString&, const QString&)), this, SLOT(profileChanged(const QString&, const QString&)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void DataFilesPage::masterSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
|
void DataFilesPage::masterSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
|
||||||
|
@ -341,7 +345,7 @@ void DataFilesPage::masterSelectionChanged(const QItemSelection &selected, const
|
||||||
QString master = currentIndex.data().toString();
|
QString master = currentIndex.data().toString();
|
||||||
master.prepend("*");
|
master.prepend("*");
|
||||||
master.append("*");
|
master.append("*");
|
||||||
QList<QStandardItem *> itemList = mDataFilesModel->findItems(master, Qt::MatchWildcard);
|
const QList<QStandardItem *> itemList = mDataFilesModel->findItems(master, Qt::MatchWildcard);
|
||||||
|
|
||||||
if (itemList.isEmpty())
|
if (itemList.isEmpty())
|
||||||
qDebug() << "Empty as shit";
|
qDebug() << "Empty as shit";
|
||||||
|
|
Loading…
Reference in a new issue