| 297 | } |
| 298 | |
| 299 | void ForgeManager::setWindowChartGrid(const fg_window window, const int r, |
| 300 | const int c) { |
| 301 | auto chart_iter = mChartMap.find(window); |
| 302 | |
| 303 | if (chart_iter != mChartMap.end()) { |
| 304 | // ChartVec found. Clear it. |
| 305 | // This has to be cleared as there is no guarantee that existing |
| 306 | // chart types(2D/3D) match the future grid requirements |
| 307 | for (const ChartPtr& c : chart_iter->second) { |
| 308 | if (c) { mChartAxesOverrideMap.erase(c->handle); } |
| 309 | } |
| 310 | (chart_iter->second).clear(); // Clear ChartList |
| 311 | auto gIter = mWndGridMap.find(window); |
| 312 | gIter->second = make_pair(1, 1); |
| 313 | } |
| 314 | |
| 315 | if (r == 0 || c == 0) { |
| 316 | mChartMap.erase(window); |
| 317 | mWndGridMap.erase(window); |
| 318 | } else { |
| 319 | mChartMap[window] = ChartList(r * c); |
| 320 | mWndGridMap[window] = std::make_pair(r, c); |
| 321 | } |
| 322 | } |
| 323 | |
| 324 | ForgeManager::WindowGridDims ForgeManager::getWindowGrid( |
| 325 | const fg_window window) { |
no test coverage detected