| 619 | } |
| 620 | |
| 621 | void ProjectEditor::execDeleteSheetDialog(int index) noexcept { |
| 622 | Schematic* schematic = mProject->getSchematicByIndex(index); |
| 623 | if (!schematic) return; |
| 624 | |
| 625 | emit abortBlockingToolsInOtherEditors(nullptr); // Release undo stack. |
| 626 | |
| 627 | try { |
| 628 | mUndoStack->execCmd(new CmdSchematicRemove(*mProject, *schematic)); |
| 629 | } catch (const Exception& e) { |
| 630 | QMessageBox::critical(qApp->activeWindow(), tr("Error"), e.getMsg()); |
| 631 | } |
| 632 | } |
| 633 | |
| 634 | std::shared_ptr<BoardEditor> ProjectEditor::execNewBoardDialog( |
| 635 | std::optional<int> copyFromIndex) noexcept { |
no test coverage detected