From 57e1216f798dbbe479493c19658da36b96622290 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Fri, 29 Jan 2010 14:07:12 +0200 Subject: Fixed normal bug EXT-4374 - Gestures floater: 'Activate' btn applies unsaved changes to gesture. --HG-- branch : product-engine --- indra/newview/llpreviewgesture.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'indra/newview/llpreviewgesture.cpp') diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp index 84bdaafacf..53e351e66e 100644 --- a/indra/newview/llpreviewgesture.cpp +++ b/indra/newview/llpreviewgesture.cpp @@ -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; -- cgit v1.2.3