# HG changeset patch # User Teemu Piippo # Date 1681047033 -10800 # Node ID df61cd3d5ab4af8aff1c17ad45261c3b72932fa8 # Parent ea656dead697f0bfebc1fb75fdd7af9582da32ed Also connect up the "Delete" action diff -r ea656dead697 -r df61cd3d5ab4 src/main.cpp --- 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();