##// END OF EJS Templates
Remove abort button validity when the progress is finished (eg. == 0)
perrinel -
r432:7b7f9803a2fe
parent child
Show More
@@ -112,7 +112,12 std::shared_ptr<Variable> VariableModel::variable(int index) const
112
112
113 void VariableModel::setDataProgress(std::shared_ptr<Variable> variable, double progress)
113 void VariableModel::setDataProgress(std::shared_ptr<Variable> variable, double progress)
114 {
114 {
115 impl->m_VariableToProgress[variable] = progress;
115 if (progress > 0.0) {
116 impl->m_VariableToProgress[variable] = progress;
117 }
118 else {
119 impl->m_VariableToProgress.erase(variable);
120 }
116 auto modelIndex = createIndex(impl->indexOfVariable(variable.get()), NAME_COLUMN);
121 auto modelIndex = createIndex(impl->indexOfVariable(variable.get()), NAME_COLUMN);
117
122
118 emit dataChanged(modelIndex, modelIndex);
123 emit dataChanged(modelIndex, modelIndex);
@@ -83,7 +83,7 void CosinusProvider::requestDataAborting(QUuid identifier)
83 {
83 {
84 // TODO: Add Mutex
84 // TODO: Add Mutex
85 qCDebug(LOG_CosinusProvider()) << "CosinusProvider::requestDataAborting" << identifier
85 qCDebug(LOG_CosinusProvider()) << "CosinusProvider::requestDataAborting" << identifier
86 << QThread::currentThread()->objectName();
86 << QThread::currentThread()->objectName();
87 auto it = m_VariableToEnableProvider.find(identifier);
87 auto it = m_VariableToEnableProvider.find(identifier);
88 if (it != m_VariableToEnableProvider.end()) {
88 if (it != m_VariableToEnableProvider.end()) {
89 it.value() = false;
89 it.value() = false;
General Comments 0
You need to be logged in to leave comments. Login now