summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index c6413fc1..08fdcee7 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -2684,6 +2684,8 @@ void MainWindow::modStatusChanged(unsigned int index)
if (m_CurrentProfile->modEnabled(index)) {
updateModInDirectoryStructure(index, modInfo);
} else {
+ updateModActiveState(index, false);
+ refreshESPList();
if (m_DirectoryStructure->originExists(ToWString(modInfo->name()))) {
FilesOrigin &origin = m_DirectoryStructure->getOriginByName(ToWString(modInfo->name()));
origin.enable(false);
@@ -3004,7 +3006,7 @@ void MainWindow::updateModActiveState(int index, bool active)
int enabled = 0;
QStringList esps = dir.entryList(QStringList("*.esp"), QDir::Files);
foreach (const QString &esp, esps) {
- if (active && !m_PluginList.isEnabled(esp)) {
+ if (active != m_PluginList.isEnabled(esp)) {
m_PluginList.enableESP(esp, active);
++enabled;
}
@@ -3020,9 +3022,6 @@ void MainWindow::updateModActiveState(int index, bool active)
void MainWindow::modlistChanged(const QModelIndex&, int)
{
-/* if (role == Qt::CheckStateRole) {
- updateModActiveState(index.row(), index.data(Qt::CheckStateRole).toBool());
- }*/
}
void MainWindow::removeMod_clicked()
@@ -4010,6 +4009,7 @@ void MainWindow::linkToolbar()
const Executable &selectedExecutable = ui->executablesListBox->itemData(ui->executablesListBox->currentIndex()).value<Executable>();
Executable &exe = m_ExecutablesList.find(selectedExecutable.m_Title);
exe.m_Toolbar = !exe.m_Toolbar;
+ ui->linkButton->menu()->actions().at(2)->setIcon(exe.m_Toolbar ? QIcon(":/MO/gui/remove") : QIcon(":/MO/gui/link"));
updateToolBar();
}