MCPcopy Create free account
hub / github.com/dail8859/NotepadNext / updateSaveStatusBasedUi

Method updateSaveStatusBasedUi

src/dialogs/MainWindow.cpp:1664–1684  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1662}
1663
1664void MainWindow::updateSaveStatusBasedUi(ScintillaNext *editor)
1665{
1666 qInfo(Q_FUNC_INFO);
1667
1668 bool isDirty = !editor->isSavedToDisk();
1669
1670 setWindowModified(isDirty);
1671
1672 ui->actionSave->setEnabled(isDirty);
1673 ui->actionSaveAll->setEnabled(isDirty || isAnyUnsaved());
1674
1675 if (editorCount() == 1) {
1676 bool ableToClose = editor->isFile() || isDirty;
1677 ui->actionClose->setEnabled(ableToClose);
1678 ui->actionCloseAll->setEnabled(ableToClose);
1679 }
1680 else {
1681 ui->actionClose->setEnabled(true);
1682 ui->actionCloseAll->setEnabled(true);
1683 }
1684}
1685
1686void MainWindow::updateEditorPositionBasedUi()
1687{

Callers

nothing calls this directly

Calls 3

isSavedToDiskMethod · 0.80
isFileMethod · 0.80
setEnabledMethod · 0.45

Tested by

no test coverage detected