aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpreview.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:56 -0500
committerJacek Antonelli2008-08-15 23:44:56 -0500
commitc07901e29ed545bbb02e3bddf148fe1104b94e9f (patch)
treef1ada64ce834acd7d92a425efb96c4b86bcf16b1 /linden/indra/newview/llpreview.cpp
parentSecond Life viewer sources 1.15.0.2 (diff)
downloadmeta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.zip
meta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.tar.gz
meta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.tar.bz2
meta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.tar.xz
Second Life viewer sources 1.15.1.3
Diffstat (limited to 'linden/indra/newview/llpreview.cpp')
-rw-r--r--linden/indra/newview/llpreview.cpp24
1 files changed, 17 insertions, 7 deletions
diff --git a/linden/indra/newview/llpreview.cpp b/linden/indra/newview/llpreview.cpp
index 347c6d5..23f31aa 100644
--- a/linden/indra/newview/llpreview.cpp
+++ b/linden/indra/newview/llpreview.cpp
@@ -60,6 +60,7 @@ LLPreview::LLPreview(const std::string& name) :
60 LLFloater(name), 60 LLFloater(name),
61 mCopyToInvBtn(NULL), 61 mCopyToInvBtn(NULL),
62 mForceClose(FALSE), 62 mForceClose(FALSE),
63 mUserResized(FALSE),
63 mCloseAfterSave(FALSE), 64 mCloseAfterSave(FALSE),
64 mAssetStatus(PREVIEW_ASSET_UNLOADED) 65 mAssetStatus(PREVIEW_ASSET_UNLOADED)
65{ 66{
@@ -76,6 +77,7 @@ LLPreview::LLPreview(const std::string& name, const LLRect& rect, const std::str
76 mObjectUUID(object_uuid), 77 mObjectUUID(object_uuid),
77 mCopyToInvBtn( NULL ), 78 mCopyToInvBtn( NULL ),
78 mForceClose( FALSE ), 79 mForceClose( FALSE ),
80 mUserResized(FALSE),
79 mCloseAfterSave(FALSE), 81 mCloseAfterSave(FALSE),
80 mAssetStatus(PREVIEW_ASSET_UNLOADED) 82 mAssetStatus(PREVIEW_ASSET_UNLOADED)
81{ 83{
@@ -189,8 +191,6 @@ void LLPreview::onCommit()
189 } 191 }
190 192
191 LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item); 193 LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
192 BOOL has_sale_info = FALSE;
193 LLSaleInfo sale_info;
194 new_item->setDescription(childGetText("desc")); 194 new_item->setDescription(childGetText("desc"));
195 if(mObjectUUID.notNull()) 195 if(mObjectUUID.notNull())
196 { 196 {
@@ -222,11 +222,6 @@ void LLPreview::onCommit()
222 gSelectMgr->deselectAll(); 222 gSelectMgr->deselectAll();
223 gSelectMgr->addAsIndividual( obj, SELECT_ALL_TES, FALSE ); 223 gSelectMgr->addAsIndividual( obj, SELECT_ALL_TES, FALSE );
224 gSelectMgr->selectionSetObjectDescription( childGetText("desc") ); 224 gSelectMgr->selectionSetObjectDescription( childGetText("desc") );
225
226 if( has_sale_info )
227 {
228 gSelectMgr->selectionSetObjectSaleInfo( sale_info );
229 }
230 225
231 gSelectMgr->deselectAll(); 226 gSelectMgr->deselectAll();
232 } 227 }
@@ -487,6 +482,12 @@ LLPreview* LLPreview::getFirstPreviewForSource(const LLUUID& source_id)
487 return NULL; 482 return NULL;
488} 483}
489 484
485void LLPreview::userSetShape(const LLRect& new_rect)
486{
487 userResized();
488 LLView::userSetShape(new_rect);
489}
490
490// 491//
491// LLMultiPreview 492// LLMultiPreview
492// 493//
@@ -506,6 +507,15 @@ void LLMultiPreview::open() /*Flawfinder: ignore*/
506 } 507 }
507} 508}
508 509
510
511void LLMultiPreview::userSetShape(const LLRect& new_rect)
512{
513 LLPreview* frontmost_preview = (LLPreview*)mTabContainer->getCurrentPanel();
514 if (frontmost_preview) frontmost_preview->userResized();
515 LLView::userSetShape(new_rect);
516}
517
518
509void LLMultiPreview::tabOpen(LLFloater* opened_floater, bool from_click) 519void LLMultiPreview::tabOpen(LLFloater* opened_floater, bool from_click)
510{ 520{
511 LLPreview* opened_preview = (LLPreview*)opened_floater; 521 LLPreview* opened_preview = (LLPreview*)opened_floater;