* @brief Returns the JS code attached to the selected painter group. */
| 1031 | * @brief Returns the JS code attached to the selected painter group. |
| 1032 | */ |
| 1033 | QString DataModel::ProjectEditor::currentGroupPainterCode() const |
| 1034 | { |
| 1035 | const int gid = m_selectedGroup.groupId; |
| 1036 | const auto& groups = DataModel::ProjectModel::instance().groups(); |
| 1037 | if (gid >= 0 && static_cast<size_t>(gid) < groups.size()) |
| 1038 | return groups[gid].painterCode; |
| 1039 | |
| 1040 | return m_selectedGroup.painterCode; |
| 1041 | } |
| 1042 | |
| 1043 | /** |
| 1044 | * @brief Returns true when the selected group is a painter widget. |
no test coverage detected