diff --git a/indra/newview/fsfloaterposer.cpp b/indra/newview/fsfloaterposer.cpp index 265374722f..b2e82b9b74 100644 --- a/indra/newview/fsfloaterposer.cpp +++ b/indra/newview/fsfloaterposer.cpp @@ -510,6 +510,12 @@ void FSFloaterPoser::onClickBrowsePoseCache() void FSFloaterPoser::onPoseJointsReset() { + // This is a double-click function: it needs to run twice within some amount of time to complete. + auto timeIntervalSinceLastClick = std::chrono::system_clock::now() - _timeLastClickedJointReset; + _timeLastClickedJointReset = std::chrono::system_clock::now(); + if (timeIntervalSinceLastClick > _doubleClickInterval) + return; + LLVOAvatar *avatar = getUiSelectedAvatar(); if (!avatar) return; diff --git a/indra/newview/fsfloaterposer.h b/indra/newview/fsfloaterposer.h index 909a64a20b..872a54c40b 100644 --- a/indra/newview/fsfloaterposer.h +++ b/indra/newview/fsfloaterposer.h @@ -279,7 +279,23 @@ class FSFloaterPoser : public LLFloater /// The smallest text embiggens the noble selection. /// void refreshTextEmbiggeningOnAllScrollLists(); + + /// + /// Applies the appropriate font-face (such as bold) to the text of the supplied list, to indicate use. + /// + /// The name of the list to adjust text-face for. + /// The avatar to whom the list is relevant. void addBoldToScrollList(std::string listName, LLVOAvatar *avatar); + + /// + /// The time when the last click of a button was made. + /// + std::chrono::system_clock::time_point _timeLastClickedJointReset = std::chrono::system_clock::now(); + + /// + /// The constant time interval, in seconds, a user must click twice within to successfully double-click a button. + /// + std::chrono::duration const _doubleClickInterval = std::chrono::duration(0.3); }; #endif diff --git a/indra/newview/skins/default/xui/en/floater_poser.xml b/indra/newview/skins/default/xui/en/floater_poser.xml index 08d99b1734..c4b33e93a0 100644 --- a/indra/newview/skins/default/xui/en/floater_poser.xml +++ b/indra/newview/skins/default/xui/en/floater_poser.xml @@ -652,7 +652,7 @@ width="565"> image_overlay="Inv_TrashOpen" image_unselected="Toolbar_Middle_Off" name="refresh_avatars" - tool_tip="Reset all selected body parts to when you first started" + tool_tip="Double click to reset all selected body parts to when you first started posing" width="20" top_delta="0" left_pad="1">