summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatertools.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloatertools.cpp')
-rw-r--r--indra/newview/llfloatertools.cpp39
1 files changed, 15 insertions, 24 deletions
diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp
index 88a98c3350..7fb71d4d4f 100644
--- a/indra/newview/llfloatertools.cpp
+++ b/indra/newview/llfloatertools.cpp
@@ -52,6 +52,7 @@
#include "llmediaentry.h"
#include "llmediactrl.h"
#include "llmenugl.h"
+#include "llnotificationsutil.h"
#include "llpanelcontents.h"
#include "llpanelface.h"
#include "llpanelland.h"
@@ -564,7 +565,8 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
mBtnEdit ->setToggleState( edit_visible );
mRadioGroupEdit->setVisible( edit_visible );
- childSetVisible("RenderingCost", edit_visible || focus_visible || move_visible);
+ bool linked_parts = gSavedSettings.getBOOL("EditLinkedParts");
+ childSetVisible("RenderingCost", !linked_parts && (edit_visible || focus_visible || move_visible));
if (mCheckSelectIndividual)
{
@@ -976,6 +978,8 @@ void LLFloaterTools::onClickGridOptions()
S32 LLFloaterTools::calcRenderCost()
{
S32 cost = 0;
+ std::set<LLUUID> textures;
+
for (LLObjectSelection::iterator selection_iter = LLSelectMgr::getInstance()->getSelection()->begin();
selection_iter != LLSelectMgr::getInstance()->getSelection()->end();
++selection_iter)
@@ -986,11 +990,14 @@ S32 LLFloaterTools::calcRenderCost()
LLVOVolume *viewer_volume = (LLVOVolume*)select_node->getObject();
if (viewer_volume)
{
- cost += viewer_volume->getRenderCost();
+ cost += viewer_volume->getRenderCost(textures);
+ cost += textures.size() * LLVOVolume::ARC_TEXTURE_COST;
+ textures.clear();
}
}
}
+
return cost;
}
@@ -1073,7 +1080,7 @@ void LLFloaterTools::getMediaState()
{
LLObjectSelectionHandle selected_objects =LLSelectMgr::getInstance()->getSelection();
LLViewerObject* first_object = selected_objects->getFirstObject();
- LLLineEditor* media_info = getChild<LLLineEditor>("media_info");
+ LLTextBox* media_info = getChild<LLTextBox>("media_info");
if( !(first_object
&& first_object->getPCode() == LL_PCODE_VOLUME
@@ -1081,12 +1088,6 @@ void LLFloaterTools::getMediaState()
))
{
childSetEnabled("Add_Media", FALSE);
-/* childSetEnabled("media_tex", FALSE);
- childSetEnabled("add_media", FALSE);
- childSetEnabled("delete_media", FALSE);
- childSetEnabled("edit_media", FALSE);
- childSetEnabled("media_info", FALSE);
- media_info->setEnabled(FALSE);*/
media_info->clear();
clearMediaSettings();
return;
@@ -1098,13 +1099,6 @@ void LLFloaterTools::getMediaState()
if(!has_media_capability)
{
childSetEnabled("Add_Media", FALSE);
- /* childSetEnabled("media_tex", FALSE);
- childSetEnabled("add_media", FALSE);
- childSetEnabled("delete_media", FALSE);
- childSetEnabled("edit_media", FALSE);
- childSetEnabled("media_info", FALSE);
- media_info->setEnabled(FALSE);
- media_info->clear();*/
LL_WARNS("LLFloaterTools: media") << "Media not enabled (no capability) in this region!" << LL_ENDL;
clearMediaSettings();
return;
@@ -1226,7 +1220,6 @@ void LLFloaterTools::getMediaState()
childSetEnabled( "edit_media", bool_has_media & editable );
childSetEnabled( "delete_media", bool_has_media & editable );
childSetEnabled( "add_media", ( ! bool_has_media ) & editable );
- media_info->setEnabled(false);
// TODO: display a list of all media on the face - use 'identical' flag
}
else // not all face has media but at least one does.
@@ -1253,8 +1246,6 @@ void LLFloaterTools::getMediaState()
}
}
- media_info->setEnabled(false);
- media_info->setTentative(true);
childSetEnabled("media_tex", TRUE);
childSetEnabled( "edit_media", TRUE);
childSetEnabled( "delete_media", TRUE);
@@ -1277,7 +1268,7 @@ void LLFloaterTools::onClickBtnAddMedia()
LLTool *tool = LLToolMgr::getInstance()->getCurrentTool();
if((tool != LLToolFace::getInstance()) || LLSelectMgr::getInstance()->getSelection()->isMultipleTESelected())
{
- LLNotifications::instance().add("MultipleFacesSelected",LLSD(), LLSD(), multipleFacesSelectedConfirm);
+ LLNotificationsUtil::add("MultipleFacesSelected",LLSD(), LLSD(), multipleFacesSelectedConfirm);
}
else
@@ -1290,7 +1281,7 @@ void LLFloaterTools::onClickBtnAddMedia()
// static
bool LLFloaterTools::multipleFacesSelectedConfirm(const LLSD& notification, const LLSD& response)
{
- S32 option = LLNotification::getSelectedOption(notification, response);
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
switch( option )
{
case 0: // "Yes"
@@ -1316,14 +1307,14 @@ void LLFloaterTools::onClickBtnEditMedia()
// called when a user wants to delete media from a prim or prim face
void LLFloaterTools::onClickBtnDeleteMedia()
{
- LLNotifications::instance().add("DeleteMedia", LLSD(), LLSD(), deleteMediaConfirm);
+ LLNotificationsUtil::add("DeleteMedia", LLSD(), LLSD(), deleteMediaConfirm);
}
// static
bool LLFloaterTools::deleteMediaConfirm(const LLSD& notification, const LLSD& response)
{
- S32 option = LLNotification::getSelectedOption(notification, response);
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
switch( option )
{
case 0: // "Yes"
@@ -1385,7 +1376,7 @@ void LLFloaterTools::updateMediaTitle()
if ( ! media_title.empty() )
{
// update the UI widget
- LLLineEditor* media_title_field = getChild<LLLineEditor>("media_info");
+ LLTextBox* media_title_field = getChild<LLTextBox>("media_info");
if ( media_title_field )
{
media_title_field->setText( media_title );