summaryrefslogtreecommitdiff
path: root/indra/newview/llpreviewnotecard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpreviewnotecard.cpp')
-rw-r--r--indra/newview/llpreviewnotecard.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp
index cc70360528..75702dc8e5 100644
--- a/indra/newview/llpreviewnotecard.cpp
+++ b/indra/newview/llpreviewnotecard.cpp
@@ -38,9 +38,11 @@
#include "llagent.h"
#include "llassetuploadresponders.h"
+#include "lldraghandle.h"
#include "llviewerwindow.h"
#include "llbutton.h"
#include "llfloaterreg.h"
+#include "llinventorydefines.h"
#include "llinventorymodel.h"
#include "lllineeditor.h"
#include "llnotificationsutil.h"
@@ -95,7 +97,7 @@ BOOL LLPreviewNotecard::postBuild()
childSetCommitCallback("desc", LLPreview::onText, this);
if (item)
childSetText("desc", item->getDescription());
- childSetPrevalidate("desc", &LLLineEditor::prevalidateASCIIPrintableNoPipe);
+ childSetPrevalidate("desc", &LLTextValidate::validateASCIIPrintableNoPipe);
return LLPreview::postBuild();
}
@@ -188,6 +190,20 @@ void LLPreviewNotecard::refreshFromInventory(const LLUUID& new_item_id)
loadAsset();
}
+void LLPreviewNotecard::updateTitleButtons()
+{
+ LLPreview::updateTitleButtons();
+
+ LLUICtrl* lock_btn = getChild<LLUICtrl>("lock");
+ if(lock_btn->getVisible() && !isMinimized()) // lock button stays visible if floater is minimized.
+ {
+ LLRect lock_rc = lock_btn->getRect();
+ LLRect buttons_rect = getDragHandle()->getButtonsRect();
+ buttons_rect.mLeft = lock_rc.mLeft;
+ getDragHandle()->setButtonsRect(buttons_rect);
+ }
+}
+
void LLPreviewNotecard::loadAsset()
{
// request the asset.