QmlDesigner: Change run target when shortcut used

When a user uses a shortcut to run the application in either normal mode
or live preview and the target selected in the run button, change it
accordingly to the last ran target.

Change-Id: Id398dde35121570e267cabdc81019d899a0e6b2f
Reviewed-by: Burak Hancerli <burak.hancerli@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Henning Gruendl
2025-02-18 14:04:45 +01:00
committed by Henning Gründl
parent 88026e33b3
commit cd79ad6845

View File

@@ -175,6 +175,9 @@ RunManager::RunManager(DeviceShare::DeviceManager &deviceManager)
[this](ProjectExplorer::RunControl *runControl) { [this](ProjectExplorer::RunControl *runControl) {
qCDebug(runManagerLog) << "Run Control started."; qCDebug(runManagerLog) << "Run Control started.";
if (m_currentTargetId != runControl->runMode())
selectRunTarget(runControl->runMode());
m_runningTargets.append(QPointer(runControl)); m_runningTargets.append(QPointer(runControl));
setState(TargetState::Running); setState(TargetState::Running);