FIRE-10650: Save the last selected pose and use it when opening the pose stand

master
Cinders 2013-08-15 20:53:41 -06:00
parent 43fff28485
commit 794db37085
2 changed files with 35 additions and 21 deletions

View File

@ -20913,26 +20913,37 @@ Change of this parameter will affect the layout of buttons in notification toast
<integer>0</integer>
</map>
<key>FSLegacyRadarFriendColoring</key>
<map>
<key>Comment</key>
<string>Use old style for friends on the radar. Uses same color as minimap.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<map>
<key>Comment</key>
<string>Use old style for friends on the radar. Uses same color as minimap.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>FSLegacyRadarLindenColoring</key>
<map>
<key>Comment</key>
<string>Color Lindens on the radar the same as the minimap.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<map>
<key>Comment</key>
<string>Color Lindens on the radar the same as the minimap.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>FSPoseStandLastSelectedPose</key>
<map>
<key>Comment</key>
<string>Last selected pose in the pose stand</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string />
</map>
</map>
</llsd>

View File

@ -36,7 +36,6 @@ BOOL FSFloaterPoseStand::postBuild()
mComboPose = getChild<LLComboBox>("pose_combo");
mComboPose->setCommitCallback(boost::bind(&FSFloaterPoseStand::onCommitCombo, this));
loadPoses();
onCommitCombo();
return TRUE;
}
@ -55,6 +54,9 @@ void FSFloaterPoseStand::onOpen(const LLSD& key)
gAgent.setCustomAnim(TRUE);
gFocusMgr.setKeyboardFocus(NULL);
gFocusMgr.setMouseCapture(NULL);
std::string last_pose = gSavedSettings.getString("FSPoseStandLastSelectedPose");
if (!last_pose.empty())
mComboPose->setSelectedByValue(last_pose, TRUE);
onCommitCombo();
}
@ -96,6 +98,7 @@ void FSFloaterPoseStand::loadPoses()
void FSFloaterPoseStand::onCommitCombo()
{
std::string selected_pose = mComboPose->getValue();
gSavedSettings.setString("FSPoseStandLastSelectedPose", selected_pose);
FSPose::getInstance()->setPose(selected_pose);
}