diff --git a/indra/newview/fsfloaterposer.cpp b/indra/newview/fsfloaterposer.cpp
index 7fe558734f..088ab6b0ae 100644
--- a/indra/newview/fsfloaterposer.cpp
+++ b/indra/newview/fsfloaterposer.cpp
@@ -239,6 +239,19 @@ void FSFloaterPoser::onOpen(const LLSD& key)
LLFloater::onOpen(key);
}
+
+void FSFloaterPoser::onFocusReceived()
+{
+ LLEditMenuHandler::gEditMenuHandler = this;
+}
+
+void FSFloaterPoser::onFocusLost()
+{
+ if( LLEditMenuHandler::gEditMenuHandler == this )
+ {
+ LLEditMenuHandler::gEditMenuHandler = nullptr;
+ }
+}
void FSFloaterPoser::enableVisualManipulators()
{
if (LLToolMgr::getInstance()->getCurrentToolset() != gCameraToolset)
diff --git a/indra/newview/fsfloaterposer.h b/indra/newview/fsfloaterposer.h
index cf75cd65c9..c3ab3d6f99 100644
--- a/indra/newview/fsfloaterposer.h
+++ b/indra/newview/fsfloaterposer.h
@@ -74,18 +74,23 @@ typedef enum E_Columns
/// A class containing the UI fiddling for the Poser Floater.
/// Please don't do LLJoint stuff here, fsposingmotion (the LLMotion derivative) is the class for that.
///
-class FSFloaterPoser : public LLFloater
+class FSFloaterPoser : public LLFloater, public LLEditMenuHandler
{
friend class LLFloaterReg;
FSFloaterPoser(const LLSD &key);
public:
void updatePosedBones();
void selectJointByName(const std::string& jointName);
+ void undo() override { onUndoLastChange(); };
+ bool canUndo() const override { return true; }
+ void redo() override { onRedoLastChange(); };
+ bool canRedo() const override { return true; }
private:
bool postBuild() override;
void onOpen(const LLSD& key) override;
void onClose(bool app_quitting) override;
-
+ void onFocusReceived() override;
+ void onFocusLost() override;
///
/// Refreshes the supplied pose list from the supplued subdirectory.
///
diff --git a/indra/newview/fsmaniprotatejoint.cpp b/indra/newview/fsmaniprotatejoint.cpp
index 6ab5724073..f1e177912c 100644
--- a/indra/newview/fsmaniprotatejoint.cpp
+++ b/indra/newview/fsmaniprotatejoint.cpp
@@ -932,14 +932,15 @@ bool FSManipRotateJoint::handleMouseDown(S32 x, S32 y, MASK mask)
*/
bool FSManipRotateJoint::handleMouseDownOnPart(S32 x, S32 y, MASK mask)
{
+ auto * poser = dynamic_cast(LLFloaterReg::findInstance("fs_poser"));
// Determine which ring (axis) is under the mouse, also highlights selectable joints.
highlightManipulators(x, y);
// For joint manipulation, require both a valid joint and avatar.
- if (!mJoint || !mAvatar)
+ if (!mJoint || !mAvatar || !poser)
{
return false;
}
-
+ poser->setFocus(true);
S32 hit_part = mHighlightedPart;
// Save the joint’s current world rotation as the basis for the drag.
diff --git a/indra/newview/skins/default/xui/en/floater_fs_poser.xml b/indra/newview/skins/default/xui/en/floater_fs_poser.xml
index d9f809a8d7..cb50399b2b 100644
--- a/indra/newview/skins/default/xui/en/floater_fs_poser.xml
+++ b/indra/newview/skins/default/xui/en/floater_fs_poser.xml
@@ -937,7 +937,7 @@ width="430">
tool_tip="Toggle the visual manipulators on and off"
height="50"
width="50"
- left="2"
+ left="5"
bottom_delta="5"
>