From f1588a73e1fe14a36b0da1ecacc2da5635a4b505 Mon Sep 17 00:00:00 2001 From: Nicky Date: Fri, 20 Feb 2015 00:05:21 +0100 Subject: [PATCH] Allow to copy the text and accelerator/shortcut of a menu-item be copied to right click it while holding CTRL and ALT. --- indra/llui/llmenugl.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index e025365fd3..8b33c301dd 100755 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -61,6 +61,7 @@ #include #include +#include "llclipboard.h" // Holding CTRL & ALT while right clicking a menu entry will copy the menu + // text and shortcut (accelerator) to the clipboard. The menu items action will not be called. + if( (MASK_CONTROL|MASK_ALT) == ((MASK_CONTROL|MASK_ALT) & mask) ) + { + LLWString label = utf8string_to_wstring( getLabel() + ": " + mDrawAccelLabel.getString() ); + LLClipboard::instance().copyToClipboard( label, 0, label.size() ); + return FALSE; + } + // + return LLUICtrl::handleRightMouseDown(x,y,mask); }