|
@@ -164,6 +164,10 @@ void MainWindow::switchToStartTab()
|
|
|
ui->startGameButton->setEnabled(true);
|
|
|
ui->startGameButton->setChecked(true);
|
|
|
ui->tabListWidget->setCurrentIndex(TabRows::START);
|
|
|
+
|
|
|
+ auto* startGameTabWidget = qobject_cast<StartGameTab*>(ui->tabListWidget->widget(TabRows::START));
|
|
|
+ if(startGameTabWidget)
|
|
|
+ startGameTabWidget->refreshState();
|
|
|
}
|
|
|
|
|
|
void MainWindow::switchToModsTab()
|
|
@@ -247,6 +251,9 @@ void MainWindow::dropEvent(QDropEvent* event)
|
|
|
|
|
|
void MainWindow::manualInstallFile(QString filePath)
|
|
|
{
|
|
|
+ if(filePath.endsWith(".zip", Qt::CaseInsensitive) || filePath.endsWith(".exe", Qt::CaseInsensitive))
|
|
|
+ switchToModsTab();
|
|
|
+
|
|
|
QString fileName = QFileInfo{filePath}.fileName();
|
|
|
if(filePath.endsWith(".zip", Qt::CaseInsensitive))
|
|
|
getModView()->downloadFile(fileName.toLower()
|
|
@@ -279,7 +286,7 @@ void MainWindow::manualInstallFile(QString filePath)
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
- getModView()->downloadFile(fileName, QUrl::fromLocalFile(filePath), fileName);
|
|
|
+ getModView()->installFiles(QStringList{filePath});
|
|
|
}
|
|
|
|
|
|
ETranslationStatus MainWindow::getTranslationStatus()
|