One unedited, new blank document
| 1064 | |
| 1065 | // One unedited, new blank document |
| 1066 | ScintillaNext *MainWindow::getInitialEditor() |
| 1067 | { |
| 1068 | if (editorCount() == 1) { |
| 1069 | ScintillaNext *editor = currentEditor(); |
| 1070 | |
| 1071 | // If the editor: |
| 1072 | // is a temporary file |
| 1073 | // is a 'real' file (or a 'missing' file) |
| 1074 | // can undo any actions |
| 1075 | // can redo any actions |
| 1076 | // Then do not treat it as an 'initial editor' that can be transparently closed for the user |
| 1077 | if (editor->isTemporary() || editor->isFile() || editor->canUndo() || editor->canRedo()) { |
| 1078 | return Q_NULLPTR; |
| 1079 | } |
| 1080 | |
| 1081 | return editor; |
| 1082 | } |
| 1083 | |
| 1084 | return Q_NULLPTR; |
| 1085 | } |
| 1086 | |
| 1087 | void MainWindow::openFileList(const QStringList &fileNames) |
| 1088 | { |
nothing calls this directly
no test coverage detected