mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 16:56:53 +08:00
Ref T298, matching setup changed signal in contexts/matcher
This commit is contained in:
@@ -28,6 +28,12 @@ namespace BlackGui
|
||||
ui->setupUi(this);
|
||||
connect(ui->pb_Save, &QPushButton::released, this, &CSettingsMatchingComponent::onSavePressed);
|
||||
connect(ui->pb_Reload, &QPushButton::released, this, &CSettingsMatchingComponent::onReloadPressed);
|
||||
|
||||
IContextSimulator *simContext = simulatorContext();
|
||||
if (simContext)
|
||||
{
|
||||
connect(simContext, &IContextSimulator::matchingSetupChanged, this, &CSettingsMatchingComponent::onSetupChanged, Qt::QueuedConnection);
|
||||
}
|
||||
this->deferredReload(5000);
|
||||
}
|
||||
|
||||
@@ -47,6 +53,13 @@ namespace BlackGui
|
||||
this->deferredReload(0);
|
||||
}
|
||||
|
||||
void CSettingsMatchingComponent::onSetupChanged()
|
||||
{
|
||||
const IContextSimulator *simContext = simulatorContext();
|
||||
if (!simContext) { return; }
|
||||
this->deferredReload(0);
|
||||
}
|
||||
|
||||
void CSettingsMatchingComponent::deferredReload(int deferMs)
|
||||
{
|
||||
if (deferMs < 1)
|
||||
|
||||
Reference in New Issue
Block a user