| 251 | } |
| 252 | |
| 253 | void ElaWindow::setCurrentStackIndex(int currentStackIndex) |
| 254 | { |
| 255 | Q_D(ElaWindow); |
| 256 | if (currentStackIndex >= d->_centerStackedWidget->getContainerStackedWidget()->count() || currentStackIndex < 0 || currentStackIndex == d->_centerStackedWidget->getLastTargetIndex()) |
| 257 | { |
| 258 | return; |
| 259 | } |
| 260 | int currentCenterStackedWidgetIndex = d->_centerStackedWidget->getContainerStackedWidget()->currentIndex(); |
| 261 | auto command = new ElaWindowStackChangeCommand(this); |
| 262 | command->setWindowPrivate(d); |
| 263 | command->setUndoStackIndex(currentCenterStackedWidgetIndex); |
| 264 | command->setRedoStackIndex(currentStackIndex); |
| 265 | ElaActionCommander::getInstance()->recordCommand("ElaWidgetToolsAction", command); |
| 266 | } |
| 267 | |
| 268 | int ElaWindow::getCurrentStackIndex() const |
| 269 | { |
no test coverage detected