##// END OF EJS Templates
Handles StateRole in variable model
Alexandre Leroux -
r809:892af30fdefb
parent child
Show More
@@ -13,8 +13,7
13 13
14 14 Q_DECLARE_LOGGING_CATEGORY(LOG_VariableModel)
15 15
16 enum VariableRoles { ProgressRole = Qt::UserRole };
17
16 enum VariableRoles { ProgressRole = Qt::UserRole, StateRole };
18 17
19 18 class IDataSeries;
20 19 class Variable;
@@ -228,6 +228,11 QVariant VariableModel::data(const QModelIndex &index, int role) const
228 228 }
229 229 }
230 230 }
231 else if (role == VariableRoles::StateRole) {
232 if (auto variable = impl->m_Variables.at(index.row())) {
233 return variable->stateData();
234 }
235 }
231 236
232 237 return QVariant{};
233 238 }
General Comments 0
You need to be logged in to leave comments. Login now