summaryrefslogtreecommitdiff
path: root/indra/newview/llpreview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpreview.cpp')
-rw-r--r--indra/newview/llpreview.cpp24
1 files changed, 17 insertions, 7 deletions
diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp
index 52ce263e59..39cc290b0f 100644
--- a/indra/newview/llpreview.cpp
+++ b/indra/newview/llpreview.cpp
@@ -40,6 +40,7 @@ LLPreview::LLPreview(const std::string& name) :
LLFloater(name),
mCopyToInvBtn(NULL),
mForceClose(FALSE),
+ mUserResized(FALSE),
mCloseAfterSave(FALSE),
mAssetStatus(PREVIEW_ASSET_UNLOADED)
{
@@ -56,6 +57,7 @@ LLPreview::LLPreview(const std::string& name, const LLRect& rect, const std::str
mObjectUUID(object_uuid),
mCopyToInvBtn( NULL ),
mForceClose( FALSE ),
+ mUserResized(FALSE),
mCloseAfterSave(FALSE),
mAssetStatus(PREVIEW_ASSET_UNLOADED)
{
@@ -169,8 +171,6 @@ void LLPreview::onCommit()
}
LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
- BOOL has_sale_info = FALSE;
- LLSaleInfo sale_info;
new_item->setDescription(childGetText("desc"));
if(mObjectUUID.notNull())
{
@@ -202,11 +202,6 @@ void LLPreview::onCommit()
gSelectMgr->deselectAll();
gSelectMgr->addAsIndividual( obj, SELECT_ALL_TES, FALSE );
gSelectMgr->selectionSetObjectDescription( childGetText("desc") );
-
- if( has_sale_info )
- {
- gSelectMgr->selectionSetObjectSaleInfo( sale_info );
- }
gSelectMgr->deselectAll();
}
@@ -467,6 +462,12 @@ LLPreview* LLPreview::getFirstPreviewForSource(const LLUUID& source_id)
return NULL;
}
+void LLPreview::userSetShape(const LLRect& new_rect)
+{
+ userResized();
+ LLView::userSetShape(new_rect);
+}
+
//
// LLMultiPreview
//
@@ -486,6 +487,15 @@ void LLMultiPreview::open() /*Flawfinder: ignore*/
}
}
+
+void LLMultiPreview::userSetShape(const LLRect& new_rect)
+{
+ LLPreview* frontmost_preview = (LLPreview*)mTabContainer->getCurrentPanel();
+ if (frontmost_preview) frontmost_preview->userResized();
+ LLView::userSetShape(new_rect);
+}
+
+
void LLMultiPreview::tabOpen(LLFloater* opened_floater, bool from_click)
{
LLPreview* opened_preview = (LLPreview*)opened_floater;