| 116 | } |
| 117 | |
| 118 | void Controller::showArea(Area *area, MainWindow *mainWindow) |
| 119 | { |
| 120 | Q_D(Controller); |
| 121 | |
| 122 | Area *areaToShow = nullptr; |
| 123 | const auto windowIt = d->shownAreas.find(area); |
| 124 | //if the area is already shown in another mainwindow then we need to clone it |
| 125 | if (windowIt != d->shownAreas.end() && (mainWindow != *windowIt)) |
| 126 | areaToShow = new Area(*area); |
| 127 | else |
| 128 | areaToShow = area; |
| 129 | d->shownAreas[areaToShow] = mainWindow; |
| 130 | |
| 131 | showAreaInternal(areaToShow, mainWindow); |
| 132 | } |
| 133 | |
| 134 | void Controller::showAreaInternal(Area* area, MainWindow *mainWindow) |
| 135 | { |