| 301 | } |
| 302 | |
| 303 | Area* Controller::areaForView(View* view) const |
| 304 | { |
| 305 | for (Area* area : allAreas()) { |
| 306 | if(area->views().contains(view)) |
| 307 | return area; |
| 308 | } |
| 309 | |
| 310 | return nullptr; |
| 311 | } |
| 312 | |
| 313 | /*We need this to catch activation of views and tool views |
| 314 | so that we can always tell what view and tool view is active. |