| 4 PolygonCache::PolygonCache(Model *model) : |
4 PolygonCache::PolygonCache(Model *model) : |
| 5 model{model} |
5 model{model} |
| 6 { |
6 { |
| 7 const auto mark = [this](){ this->needRecache = true; }; |
7 const auto mark = [this](){ this->needRecache = true; }; |
| 8 connect(model, &Model::dataChanged, mark); |
8 connect(model, &Model::dataChanged, mark); |
| 9 connect(model, &Model::objectAdded, mark); |
9 connect(model, &Model::rowsInserted, mark); |
| 10 connect(model, &Model::objectRemoved, mark); |
10 connect(model, &Model::rowsRemoved, mark); |
| 11 } |
11 } |
| 12 |
12 |
| 13 /** |
13 /** |
| 14 * @brief Gets a list of GL polygons that are used to represent this model. |
14 * @brief Gets a list of GL polygons that are used to represent this model. |
| 15 * @details Will build polygons if polygons are outdated. |
15 * @details Will build polygons if polygons are outdated. |