| 187 | } |
| 188 | |
| 189 | bool MacroSegmentList::PopulateWidgetsFromCache(const Macro *macro) |
| 190 | { |
| 191 | if (!_useCache) { |
| 192 | return false; |
| 193 | } |
| 194 | |
| 195 | auto it = _widgetCache.find(macro); |
| 196 | if (it == _widgetCache.end()) { |
| 197 | return false; |
| 198 | } |
| 199 | |
| 200 | for (auto widget : it->second) { |
| 201 | _contentLayout->addWidget(widget); |
| 202 | widget->show(); |
| 203 | } |
| 204 | |
| 205 | adjustSize(); |
| 206 | updateGeometry(); |
| 207 | return true; |
| 208 | } |
| 209 | |
| 210 | void MacroSegmentList::ClearWidgetsFromCacheFor(const Macro *macro) |
| 211 | { |
no test coverage detected