Reflect language and color scheme changes in global config in manager and all its VMs
This commit is contained in:
@@ -31,10 +31,13 @@
|
||||
#include <atomic>
|
||||
|
||||
#include "qt_vmmanager_main.hpp"
|
||||
#include "qt_vmmanager_mainwindow.hpp"
|
||||
#include "ui_qt_vmmanager_main.h"
|
||||
#include "qt_vmmanager_model.hpp"
|
||||
#include "qt_vmmanager_addmachine.hpp"
|
||||
|
||||
extern VMManagerMainWindow* vmm_main_window;
|
||||
|
||||
// https://stackoverflow.com/a/36460740
|
||||
bool copyPath(QString sourceDir, QString destinationDir, bool overWriteDirectory)
|
||||
{
|
||||
@@ -348,6 +351,10 @@ illegal_chars:
|
||||
}
|
||||
});
|
||||
|
||||
connect(vm_model, &VMManagerModel::globalConfigurationChanged, this, [this] () {
|
||||
vmm_main_window->updateSettings();
|
||||
});
|
||||
|
||||
// Initial default details view
|
||||
vm_details = new VMManagerDetails(ui->detailsArea);
|
||||
ui->detailsArea->layout()->addWidget(vm_details);
|
||||
@@ -400,6 +407,12 @@ VMManagerMain::~VMManagerMain() {
|
||||
delete vm_model;
|
||||
}
|
||||
|
||||
void
|
||||
VMManagerMain::updateGlobalSettings()
|
||||
{
|
||||
vmm_main_window->updateSettings();
|
||||
}
|
||||
|
||||
void
|
||||
VMManagerMain::currentSelectionChanged(const QModelIndex ¤t,
|
||||
const QModelIndex &previous)
|
||||
@@ -768,6 +781,10 @@ VMManagerMain::onPreferencesUpdated()
|
||||
if (oldRegexSearch != regexSearch) {
|
||||
ui->searchBar->clear();
|
||||
}
|
||||
|
||||
if (vm_model) {
|
||||
vm_model->sendGlobalConfigurationChanged();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user