Fixed normal bug EXT-4374 - Gestures floater: 'Activate' btn applies unsaved changes to gesture.

--HG--
branch : product-engine
master
Dmitry Zaporozhan 2010-01-29 14:07:12 +02:00
parent 4c2dbe9363
commit 57e1216f79
2 changed files with 9 additions and 2 deletions

View File

@ -155,6 +155,12 @@ LLPreviewGesture* LLPreviewGesture::show(const LLUUID& item_id, const LLUUID& ob
return preview;
}
void LLPreviewGesture::draw()
{
// Skip LLPreview::draw() to avoid description update
LLFloater::draw();
}
// virtual
BOOL LLPreviewGesture::handleKeyHere(KEY key, MASK mask)
{
@ -497,11 +503,9 @@ BOOL LLPreviewGesture::postBuild()
if (item)
{
childSetCommitCallback("desc", LLPreview::onText, this);
childSetText("desc", item->getDescription());
childSetPrevalidate("desc", &LLLineEditor::prevalidateASCIIPrintableNoPipe);
childSetCommitCallback("name", LLPreview::onText, this);
childSetText("name", item->getName());
childSetPrevalidate("name", &LLLineEditor::prevalidateASCIIPrintableNoPipe);
}
@ -1077,6 +1081,8 @@ void LLPreviewGesture::saveIfNeeded()
}
else
{
LLPreview::onCommit();
// Every save gets a new UUID. Yup.
LLTransactionID tid;
LLAssetID asset_id;

View File

@ -60,6 +60,7 @@ public:
virtual ~LLPreviewGesture();
// LLView
/*virtual*/ void draw();
/*virtual*/ BOOL handleKeyHere(KEY key, MASK mask);
/*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
EDragAndDropType cargo_type,