| 143 | } |
| 144 | |
| 145 | size_t CustomColorMapStorage::saveAndGetIndex(const CustomColorMap &customColormap) |
| 146 | { |
| 147 | for (size_t i = 0; i < this->customColorMaps.size(); ++i) |
| 148 | { |
| 149 | if (this->customColorMaps.at(i).name == customColormap.name) |
| 150 | { |
| 151 | this->customColorMaps[i] = customColormap; |
| 152 | storeToSettings(this->customColorMaps); |
| 153 | return i; |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | this->customColorMaps.push_back(customColormap); |
| 158 | storeToSettings(this->customColorMaps); |
| 159 | return this->customColorMaps.size() - 1; |
| 160 | } |
| 161 | |
| 162 | void CustomColorMapStorage::remove(const QString &name) |
| 163 | { |
no test coverage detected