src/main.cpp

changeset 367
df61cd3d5ab4
parent 363
16f5dcfa7c9f
child 368
9444de9762c3
--- 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();

mercurial