summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorVladimir Pchelko <pchelko@productengine.com>2010-06-18 20:30:52 +0300
committerVladimir Pchelko <pchelko@productengine.com>2010-06-18 20:30:52 +0300
commitc7f0cabc0eb530efdbbc0bf74bf33979be23e6fa (patch)
tree74ed1f4e5644173bef87030ba2d4eafe6105458c /indra/newview
parent07427b5d67c80687fc823940442efe3d4b706736 (diff)
EXT-7821 FIXED Editor type was changed to the type as in "Name:" editor in "My Inventory"->"Object Profile".
Fix details: Using line_editor instead of text_editor. Enabled ascii filter for entering, because (for example) Russian charters corrupts outfit items and makes Edit Outfit very buggy. Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/608/ --HG-- branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpaneleditwearable.cpp16
-rw-r--r--indra/newview/llpaneleditwearable.h4
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_wearable.xml20
3 files changed, 21 insertions, 19 deletions
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index 1aedfec86f..4402b2130f 100644
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -652,7 +652,7 @@ BOOL LLPanelEditWearable::postBuild()
// handled at appearance panel level?
//mBtnBack->setClickedCallback(boost::bind(&LLPanelEditWearable::onBackButtonClicked, this));
- mTextEditor = getChild<LLTextEditor>("description");
+ mNameEditor = getChild<LLLineEditor>("description");
mPanelTitle = getChild<LLTextBox>("edit_wearable_title");
mDescTitle = getChild<LLTextBox>("description_text");
@@ -758,7 +758,7 @@ BOOL LLPanelEditWearable::isDirty() const
if (mWearablePtr)
{
if (mWearablePtr->isDirty() ||
- mWearablePtr->getName().compare(mTextEditor->getText()) != 0)
+ mWearablePtr->getName().compare(mNameEditor->getText()) != 0)
{
isDirty = TRUE;
}
@@ -796,7 +796,7 @@ void LLPanelEditWearable::onRevertButtonClicked(void* userdata)
void LLPanelEditWearable::onSaveAsButtonClicked()
{
LLSD args;
- args["DESC"] = mTextEditor->getText();
+ args["DESC"] = mNameEditor->getText();
LLNotificationsUtil::add("SaveWearableAs", args, LLSD(), boost::bind(&LLPanelEditWearable::saveAsCallback, this, _1, _2));
}
@@ -810,7 +810,7 @@ void LLPanelEditWearable::saveAsCallback(const LLSD& notification, const LLSD& r
LLStringUtil::trim(wearable_name);
if( !wearable_name.empty() )
{
- mTextEditor->setText(wearable_name);
+ mNameEditor->setText(wearable_name);
saveChanges();
}
}
@@ -956,10 +956,10 @@ void LLPanelEditWearable::saveChanges()
U32 index = gAgentWearables.getWearableIndex(mWearablePtr);
- if (mWearablePtr->getName().compare(mTextEditor->getText()) != 0)
+ if (mWearablePtr->getName().compare(mNameEditor->getText()) != 0)
{
// the name of the wearable has changed, re-save wearable with new name
- gAgentWearables.saveWearableAs(mWearablePtr->getType(), index, mTextEditor->getText(), FALSE);
+ gAgentWearables.saveWearableAs(mWearablePtr->getType(), index, mNameEditor->getText(), FALSE);
}
else
{
@@ -976,7 +976,7 @@ void LLPanelEditWearable::revertChanges()
}
mWearablePtr->revertValues();
- mTextEditor->setText(mWearablePtr->getName());
+ mNameEditor->setText(mWearablePtr->getName());
}
void LLPanelEditWearable::showWearable(LLWearable* wearable, BOOL show)
@@ -1018,7 +1018,7 @@ void LLPanelEditWearable::showWearable(LLWearable* wearable, BOOL show)
mDescTitle->setText(description_title);
// set name
- mTextEditor->setText(wearable->getName());
+ mNameEditor->setText(wearable->getName());
updatePanelPickerControls(type);
updateTypeSpecificControls(type);
diff --git a/indra/newview/llpaneleditwearable.h b/indra/newview/llpaneleditwearable.h
index c63671fcc9..61441435cd 100644
--- a/indra/newview/llpaneleditwearable.h
+++ b/indra/newview/llpaneleditwearable.h
@@ -41,7 +41,6 @@
class LLCheckBoxCtrl;
class LLWearable;
-class LLTextEditor;
class LLTextBox;
class LLViewerInventoryItem;
class LLViewerVisualParam;
@@ -49,6 +48,7 @@ class LLVisualParamHint;
class LLViewerJointMesh;
class LLAccordionCtrlTab;
class LLJoint;
+class LLLineEditor;
class LLPanelEditWearable : public LLPanel
{
@@ -140,7 +140,7 @@ private:
// This text editor reference will change each time we edit a new wearable -
// it will be grabbed from the currently visible panel
- LLTextEditor *mTextEditor;
+ LLLineEditor *mNameEditor;
// The following panels will be shown/hidden based on what wearable we're editing
// body parts
diff --git a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
index 950c4a5fdb..3106ed34ff 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
@@ -225,15 +225,17 @@ left="0"
tool_tip="Female"
top="7"
width="16" />
- <text_editor
- follows="all"
- height="23"
- left="10"
- layout="topleft"
- max_length="300"
- name="description"
- top_pad="3"
- width="290" />
+ <line_editor
+ follows="all"
+ height="23"
+ layout="topleft"
+ left="10"
+ max_length="300"
+ name="description"
+ prevalidate_callback="ascii"
+ text_color="black"
+ top_pad="3"
+ width="290" />
</panel>
<panel
follows="all"