Legacy profiles: Update the tab label on the fly while typing

meow-7.2.2
Ansariel 2015-06-30 14:37:15 +02:00
parent 12d149ddd7
commit 153555833f
2 changed files with 17 additions and 0 deletions

View File

@ -1364,6 +1364,7 @@ void FSPanelPick::setSnapshotId(const LLUUID& id)
void FSPanelPick::setPickName(const std::string& name)
{
mPickName->setValue(name);
updateTabLabel(name);
}
const std::string FSPanelPick::getPickName()
@ -1409,6 +1410,11 @@ void FSPanelPick::onSnapshotChanged()
void FSPanelPick::onPickChanged(LLUICtrl* ctrl)
{
if (ctrl && ctrl == mPickName)
{
updateTabLabel(mPickName->getText());
}
enableSaveButton(isDirty());
}
@ -1586,6 +1592,15 @@ std::string FSPanelPick::createLocationText(const std::string& owner_name, const
return location_text;
}
void FSPanelPick::updateTabLabel(const std::string& title)
{
setLabel(title);
LLTabContainer* parent = dynamic_cast<LLTabContainer*>(getParent());
if (parent)
{
parent->setCurrentTabName(title);
}
}
//////////////////////////////////////////////////////////////////////////

View File

@ -399,6 +399,8 @@ public:
*/
virtual void apply();
void updateTabLabel(const std::string& title);
//This stuff we got from LLRemoteParcelObserver, in the last one we intentionally do nothing
/*virtual*/ void processParcelInfo(const LLParcelData& parcel_data);
/*virtual*/ void setParcelID(const LLUUID& parcel_id) { mParcelId = parcel_id; }