diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-04-12 00:12:30 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-12 00:12:30 +0300 |
commit | dfbbad813f3a1b9a151db7b25d3657590324ca4c (patch) | |
tree | e31cee85f651a874c4b6edc7491efa0cb2ec93d5 /indra/llui/lltooltip.cpp | |
parent | 17e1f3692c5c1e9cbc6ba6895b312a8baae9aec2 (diff) | |
parent | d0102af56d3b1d5b1d9bf3c8eb9aeea77028b70e (diff) |
Merge pull request #1204 from Ansariel/DRTVWR-600-maint-A
Merge main into maint-A
Diffstat (limited to 'indra/llui/lltooltip.cpp')
-rw-r--r-- | indra/llui/lltooltip.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/indra/llui/lltooltip.cpp b/indra/llui/lltooltip.cpp index 2cd50a7a39..4df2c0cb6d 100644 --- a/indra/llui/lltooltip.cpp +++ b/indra/llui/lltooltip.cpp @@ -154,7 +154,8 @@ LLToolTip::Params::Params() text_color("text_color"), time_based_media("time_based_media", false), web_based_media("web_based_media", false), - media_playing("media_playing", false) + media_playing("media_playing", false), + allow_paste_tooltip("allow_paste_tooltip", false) { changeDefault(chrome, true); } @@ -167,7 +168,8 @@ LLToolTip::LLToolTip(const LLToolTip::Params& p) mTextBox(NULL), mInfoButton(NULL), mPlayMediaButton(NULL), - mHomePageButton(NULL) + mHomePageButton(NULL), + mIsTooltipPastable(p.allow_paste_tooltip) { LLTextBox::Params params; params.name = params.initial_value().asString(); @@ -289,6 +291,8 @@ void LLToolTip::initFromParams(const LLToolTip::Params& p) mTextBox->setText(p.message()); } + mIsTooltipPastable = p.allow_paste_tooltip; + updateTextBox(); snapToChildren(); } @@ -483,9 +487,9 @@ void LLToolTipMgr::createToolTip(const LLToolTip::Params& params) } -void LLToolTipMgr::show(const std::string& msg) +void LLToolTipMgr::show(const std::string& msg, bool allow_paste_tooltip) { - show(LLToolTip::Params().message(msg)); + show(LLToolTip::Params().message(msg).allow_paste_tooltip(allow_paste_tooltip)); } void LLToolTipMgr::show(const LLToolTip::Params& params) @@ -626,5 +630,13 @@ void LLToolTipMgr::getToolTipMessage(std::string & message) } } +bool LLToolTipMgr::isTooltipPastable() +{ + if (toolTipVisible()) + { + return mToolTip->isTooltipPastable(); + } + return false; + } // EOF |