Sun, 09 Apr 2023 16:30:33 +0300
Also connect up the "Delete" action
src/main.cpp | file | annotate | diff | comparison | revisions |
--- a/src/main.cpp Sun Apr 09 16:27:22 2023 +0300 +++ b/src/main.cpp Sun Apr 09 16:30:33 2023 +0300 @@ -673,6 +673,14 @@ }); } ); + QObject::connect( + state.mainWindow.actionDelete, + &QAction::triggered, + [&state]{ + QTextCursor cursor = state.mainWindow.modelEdit->textCursor(); + cursor.removeSelectedText(); + } + ); restoreSettings(&state); updateRenderPreferences(&state.mainWindow, &state.renderPreferences, &state.documents); const int result = app.exec();