forked from qt-creator/qt-creator
Fix broken enabled/ disabled emulator startbutton state.
Functionality depends entirely on the active start-up project, all other projects should have the the button disabled if they have no Maemo run config or the the run config is not the active on. Reviewed-by: ck
This commit is contained in:
@@ -144,7 +144,7 @@ MaemoManager::addQemuSimulatorStarter(Project *project)
|
||||
m_qemuCommand = actionManager->registerAction(action, "MaemoEmulator",
|
||||
QList<int>() << Core::Constants::C_GLOBAL_ID);
|
||||
modeManager->addAction(m_qemuCommand, 1);
|
||||
m_qemuCommand->action()->setEnabled(true);
|
||||
m_qemuCommand->action()->setEnabled(false);
|
||||
m_qemuCommand->setAttribute(Core::Command::CA_UpdateText);
|
||||
m_qemuCommand->setAttribute(Core::Command::CA_UpdateIcon);
|
||||
|
||||
@@ -154,9 +154,11 @@ MaemoManager::addQemuSimulatorStarter(Project *project)
|
||||
void
|
||||
MaemoManager::removeQemuSimulatorStarter(Project *project)
|
||||
{
|
||||
projects.remove(project);
|
||||
if (projects.isEmpty() && m_qemuCommand)
|
||||
m_qemuCommand->action()->setVisible(false);
|
||||
if (projects.contains(project)) {
|
||||
projects.remove(project);
|
||||
if (projects.isEmpty() && m_qemuCommand)
|
||||
m_qemuCommand->action()->setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user