Beispiel #1
0
void ProjectEditor::showAllRequiredEditors() noexcept
{
    if (!mProject.getBoards().isEmpty())
        showBoardEditor();
    if (!mProject.getSchematics().isEmpty())
        showSchematicEditor();
}
Beispiel #2
0
void ProjectEditor::showAllRequiredEditors() noexcept {
  // show board editor if there is at least one board
  if (!mProject.getBoards().isEmpty()) {
    showBoardEditor();
  }
  // show schematic editor if there is at least one schematic
  if (!mProject.getSchematics().isEmpty()) {
    showSchematicEditor();
  }
  // if there aren't any boards or schematics, show the schematic editor anyway
  if (getCountOfVisibleEditorWindows() < 1) {
    showSchematicEditor();
  }
  // verify if at least one editor window is now visible
  Q_ASSERT(getCountOfVisibleEditorWindows() > 0);
}