From de002eabfe576a334181eb8806bc7d27d1d7ca9a Mon Sep 17 00:00:00 2001 From: Garux Date: Mon, 15 Sep 2025 19:43:51 +0500 Subject: [PATCH] * Copy All in console context menu --- docs/changelog-custom.txt | 1 + radiant/console.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/changelog-custom.txt b/docs/changelog-custom.txt index e7491cd0..4615ccff 100644 --- a/docs/changelog-custom.txt +++ b/docs/changelog-custom.txt @@ -373,6 +373,7 @@ menus... * Edit->Expand Selection To Layers (ctrl + q) * shift + q: move-to LayersMenu * context menu for toolbar buttons configuration + * Copy All in console context menu misc... * removed note to save before going to preferences, project settings diff --git a/radiant/console.cpp b/radiant/console.cpp index 842334e3..3f29a634 100644 --- a/radiant/console.cpp +++ b/radiant/console.cpp @@ -34,6 +34,8 @@ #include #include #include +#include +#include #ifndef WIN32 #include // write() @@ -88,8 +90,8 @@ class QPlainTextEdit_console : public QPlainTextEdit protected: void contextMenuEvent( QContextMenuEvent *event ) override { QMenu *menu = createStandardContextMenu(); - QAction *action = menu->addAction( "Clear" ); - connect( action, &QAction::triggered, this, &QPlainTextEdit::clear ); + connect( menu->addAction( "Copy All" ), &QAction::triggered, [this](){ QApplication::clipboard()->setText( toPlainText() ); } ); + connect( menu->addAction( "Clear" ), &QAction::triggered, this, &QPlainTextEdit::clear ); menu->exec( event->globalPos() ); delete menu; }