mirror of
https://github.com/86Box/86Box.git
synced 2026-02-24 20:35:32 -07:00
Reflect language and color scheme changes in global config in manager and all its VMs
This commit is contained in:
@@ -23,6 +23,7 @@ VMManagerModel::VMManagerModel() {
|
||||
for ( const auto& each_config : machines_vec) {
|
||||
machines.append(each_config);
|
||||
connect(each_config, &VMManagerSystem::itemDataChanged, this, &VMManagerModel::modelDataChanged);
|
||||
connect(each_config, &VMManagerSystem::globalConfigurationChanged, this, &VMManagerModel::globalConfigurationChanged);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,6 +139,7 @@ VMManagerModel::addConfigToModel(VMManagerSystem *system_config)
|
||||
beginInsertRows(QModelIndex(), this->rowCount(QModelIndex()), this->rowCount(QModelIndex()));
|
||||
machines.append(system_config);
|
||||
connect(system_config, &VMManagerSystem::itemDataChanged, this, &VMManagerModel::modelDataChanged);
|
||||
connect(system_config, &VMManagerSystem::globalConfigurationChanged, this, &VMManagerModel::globalConfigurationChanged);
|
||||
endInsertRows();
|
||||
}
|
||||
|
||||
@@ -177,6 +179,16 @@ VMManagerModel::getProcessStats()
|
||||
return stats;
|
||||
}
|
||||
|
||||
void
|
||||
VMManagerModel::sendGlobalConfigurationChanged()
|
||||
{
|
||||
for (auto& system: machines) {
|
||||
if (system->getProcessStatus() != VMManagerSystem::ProcessStatus::Stopped) {
|
||||
system->sendGlobalConfigurationChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
VMManagerModel::getActiveMachineCount()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user