mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-22 18:09:40 +00:00
Changed the way the masters get retrieved in masterSelectionChanged
This commit is contained in:
parent
2e058409bd
commit
ba3e4330f2
1 changed files with 4 additions and 8 deletions
|
@ -298,16 +298,16 @@ void DataFilesPage::setupConfig()
|
||||||
|
|
||||||
void DataFilesPage::masterSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
|
void DataFilesPage::masterSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
|
||||||
{
|
{
|
||||||
// TODO: Use mMasterWidget->selectedItems
|
|
||||||
if (mMastersWidget->selectionModel()->hasSelection()) {
|
if (mMastersWidget->selectionModel()->hasSelection()) {
|
||||||
const QModelIndexList selectedIndexes = mMastersWidget->selectionModel()->selectedIndexes();
|
|
||||||
|
|
||||||
QStringList masters;
|
QStringList masters;
|
||||||
QString masterstr;
|
QString masterstr;
|
||||||
|
|
||||||
// Create a QStringList containing all the masters
|
// Create a QStringList containing all the masters
|
||||||
foreach (const QModelIndex &index, selectedIndexes) {
|
const QList<QTableWidgetItem *> selectedMasters = mMastersWidget->selectedItems();
|
||||||
masters.append(index.data().toString());
|
|
||||||
|
foreach (const QTableWidgetItem *item, selectedMasters) {
|
||||||
|
masters.append(item->data(Qt::DisplayRole).toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
masters.sort();
|
masters.sort();
|
||||||
|
@ -465,10 +465,6 @@ void DataFilesPage::profileChanged(const QString &previous, const QString &curre
|
||||||
{
|
{
|
||||||
qDebug() << "Profile changed " << current << previous;
|
qDebug() << "Profile changed " << current << previous;
|
||||||
|
|
||||||
//if (previous.isEmpty()) {
|
|
||||||
// return;
|
|
||||||
//}
|
|
||||||
// Just to be sure
|
|
||||||
if (!previous.isEmpty()) {
|
if (!previous.isEmpty()) {
|
||||||
writeConfig(previous);
|
writeConfig(previous);
|
||||||
mLauncherConfig->sync();
|
mLauncherConfig->sync();
|
||||||
|
|
Loading…
Reference in a new issue