Skip to content
Snippets Groups Projects
Commit b393b6ed authored by Tobias Nätterlund's avatar Tobias Nätterlund Committed by Tobias Nätterlund
Browse files

ProjectExplorer: Have changes to device state show up in Device settings


If the state of a device changes while the Device options page is open,
the state change won't be reflected in the UI, as the options page
is operating on the cloned instance of DeviceManager.

Change-Id: I9b2385885960764b2d3892bc89712199de529cf8
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@digia.com>
parent 9815204b
No related branches found
No related tags found
No related merge requests found
...@@ -288,6 +288,11 @@ void DeviceManager::setDeviceState(Core::Id deviceId, IDevice::DeviceState devic ...@@ -288,6 +288,11 @@ void DeviceManager::setDeviceState(Core::Id deviceId, IDevice::DeviceState devic
IDevice::Ptr &device = d->devices[pos]; IDevice::Ptr &device = d->devices[pos];
if (device->deviceState() == deviceState) if (device->deviceState() == deviceState)
return; return;
// To see the state change in the DeviceSettingsWidget
if (this == instance() && d->clonedInstance)
d->clonedInstance->setDeviceState(deviceId, deviceState);
device->setDeviceState(deviceState); device->setDeviceState(deviceState);
emit deviceUpdated(deviceId); emit deviceUpdated(deviceId);
emit updated(); emit updated();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment