summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rwxr-xr-xindra/llinventory/llparcel.cpp4
-rwxr-xr-xindra/llui/lllineeditor.cpp1
-rw-r--r--indra/llwindow/llopenglview-objc.mm28
-rwxr-xr-xindra/newview/llagent.cpp6
-rwxr-xr-xindra/newview/llappearancemgr.cpp12
-rwxr-xr-xindra/newview/llavataractions.cpp10
-rwxr-xr-xindra/newview/llfavoritesbar.cpp11
-rwxr-xr-xindra/newview/llfavoritesbar.h2
-rwxr-xr-xindra/newview/llfloaterimcontainer.cpp20
-rwxr-xr-xindra/newview/llfloaterland.cpp24
-rwxr-xr-xindra/newview/llfloaternotificationsconsole.cpp17
-rwxr-xr-xindra/newview/llfloatersidepanelcontainer.cpp4
-rwxr-xr-xindra/newview/llfloatersidepanelcontainer.h2
-rwxr-xr-xindra/newview/llfloatertools.cpp3
-rwxr-xr-xindra/newview/llfloaterurlentry.cpp8
-rwxr-xr-xindra/newview/llinventorybridge.cpp27
-rwxr-xr-xindra/newview/llinventoryfilter.cpp24
-rwxr-xr-xindra/newview/llinventoryfilter.h1
-rwxr-xr-xindra/newview/llinventoryfunctions.cpp2
-rwxr-xr-xindra/newview/lllocalbitmaps.cpp41
-rwxr-xr-xindra/newview/lllocalbitmaps.h1
-rwxr-xr-xindra/newview/llmanip.cpp55
-rwxr-xr-xindra/newview/llmanip.h2
-rwxr-xr-xindra/newview/llmanipscale.cpp392
-rwxr-xr-xindra/newview/llmanipscale.h7
-rwxr-xr-xindra/newview/llmaniptranslate.cpp11
-rwxr-xr-xindra/newview/llpanelcontents.cpp7
-rwxr-xr-xindra/newview/llpanelcontents.h1
-rwxr-xr-xindra/newview/llpaneleditwearable.cpp8
-rwxr-xr-xindra/newview/llpanelgroupinvite.cpp5
-rwxr-xr-xindra/newview/llpanelgrouproles.cpp24
-rwxr-xr-xindra/newview/llpanelgrouproles.h3
-rwxr-xr-xindra/newview/llpanellogin.cpp1
-rwxr-xr-xindra/newview/llpanelobjectinventory.cpp11
-rwxr-xr-xindra/newview/llpanelobjectinventory.h1
-rwxr-xr-xindra/newview/llpanelpeoplemenus.cpp15
-rwxr-xr-xindra/newview/llpanelpeoplemenus.h1
-rwxr-xr-xindra/newview/llpanelplaceprofile.cpp5
-rwxr-xr-xindra/newview/llpreviewnotecard.cpp5
-rwxr-xr-xindra/newview/llpreviewscript.cpp3
-rwxr-xr-xindra/newview/llpreviewscript.h3
-rwxr-xr-xindra/newview/lltoastalertpanel.cpp5
-rwxr-xr-xindra/newview/lltoolgrab.cpp18
-rwxr-xr-xindra/newview/lltoolgrab.h2
-rwxr-xr-xindra/newview/lltoolpie.cpp9
-rwxr-xr-xindra/newview/lltoolselect.cpp16
-rwxr-xr-xindra/newview/llviewermenu.cpp4
-rwxr-xr-xindra/newview/llviewerobject.cpp13
-rwxr-xr-xindra/newview/llviewerparcelmgr.cpp12
-rwxr-xr-xindra/newview/llviewerparcelmgr.h1
-rwxr-xr-xindra/newview/llvoavatar.cpp2
-rwxr-xr-xindra/newview/llworldmapview.cpp2
-rwxr-xr-xindra/newview/skins/default/xui/en/floater_im_session.xml2
-rwxr-xr-xindra/newview/skins/default/xui/en/floater_snapshot.xml1
-rwxr-xr-xindra/newview/skins/default/xui/en/menu_conversation.xml1
-rwxr-xr-xindra/newview/skins/default/xui/en/mime_types.xml21
-rwxr-xr-xindra/newview/skins/default/xui/en/mime_types_linux.xml21
-rwxr-xr-xindra/newview/skins/default/xui/en/mime_types_mac.xml21
-rwxr-xr-xindra/newview/skins/default/xui/en/notifications.xml11
59 files changed, 660 insertions, 310 deletions
diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp
index e400877b3b..b24e14c72b 100755
--- a/indra/llinventory/llparcel.cpp
+++ b/indra/llinventory/llparcel.cpp
@@ -793,8 +793,6 @@ BOOL LLParcel::addToAccessList(const LLUUID& agent_id, S32 time)
}
}
- removeFromBanList(agent_id);
-
LLAccessEntry new_entry;
new_entry.mID = agent_id;
new_entry.mTime = time;
@@ -838,8 +836,6 @@ BOOL LLParcel::addToBanList(const LLUUID& agent_id, S32 time)
}
}
- removeFromAccessList(agent_id);
-
LLAccessEntry new_entry;
new_entry.mID = agent_id;
new_entry.mTime = time;
diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp
index d410a2de33..256bf6e6b6 100755
--- a/indra/llui/lllineeditor.cpp
+++ b/indra/llui/lllineeditor.cpp
@@ -253,6 +253,7 @@ void LLLineEditor::onCommit()
setControlValue(getValue());
LLUICtrl::onCommit();
+ resetDirty();
// Selection on commit needs to be turned off when evaluating maths
// expressions, to allow indication of the error position
diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm
index 017ea3769c..f7031341eb 100644
--- a/indra/llwindow/llopenglview-objc.mm
+++ b/indra/llwindow/llopenglview-objc.mm
@@ -398,9 +398,35 @@ attributedStringInfo getSegments(NSAttributedString *str)
}
}
-- (void)flagsChanged:(NSEvent *)theEvent {
+- (void)flagsChanged:(NSEvent *)theEvent
+{
mModifiers = [theEvent modifierFlags];
callModifier([theEvent modifierFlags]);
+
+ NSInteger mask = 0;
+ switch([theEvent keyCode])
+ {
+ case 56:
+ mask = NSShiftKeyMask;
+ break;
+ case 58:
+ mask = NSAlternateKeyMask;
+ break;
+ case 59:
+ mask = NSControlKeyMask;
+ break;
+ default:
+ return;
+ }
+
+ if (mModifiers & mask)
+ {
+ callKeyDown([theEvent keyCode], 0);
+ }
+ else
+ {
+ callKeyUp([theEvent keyCode], 0);
+ }
}
- (BOOL) acceptsFirstResponder
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 04f3ff9ee5..8914379073 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -3820,6 +3820,12 @@ bool LLAgent::teleportCore(bool is_local)
return false;
}
+ // force stand up and stop a sitting animation (if any), see MAINT-3969
+ if (isAgentAvatarValid() && gAgentAvatarp->getParent() && gAgentAvatarp->isSitting())
+ {
+ gAgentAvatarp->getOffObject();
+ }
+
#if 0
// This should not exist. It has been added, removed, added, and now removed again.
// This change needs to come from the simulator. Otherwise, the agent ends up out of
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 81f713502f..b7fe96727f 100755
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -1431,6 +1431,18 @@ void LLAppearanceMgr::takeOffOutfit(const LLUUID& cat_id)
uuids_to_remove.push_back(item->getUUID());
}
removeItemsFromAvatar(uuids_to_remove);
+
+ // now deactivating all gestures in that folder
+ LLInventoryModel::item_array_t gest_items;
+ getDescendentsOfAssetType(cat_id, gest_items, LLAssetType::AT_GESTURE, false);
+ for (S32 i = 0; i < gest_items.size(); ++i)
+ {
+ LLViewerInventoryItem *gest_item = gest_items[i];
+ if (LLGestureMgr::instance().isGestureActive(gest_item->getLinkedUUID()))
+ {
+ LLGestureMgr::instance().deactivateGesture(gest_item->getLinkedUUID());
+ }
+ }
}
// Create a copy of src_id + contents as a subfolder of dst_id.
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index dad85a016c..0bf5aa8031 100755
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -381,7 +381,7 @@ void LLAvatarActions::showOnMap(const LLUUID& id)
}
gFloaterWorldMap->trackAvatar(id, av_name.getDisplayName());
- LLFloaterReg::showInstance("world_map");
+ LLFloaterReg::showInstance("world_map", "center");
}
// static
@@ -533,6 +533,14 @@ void LLAvatarActions::share(const LLUUID& id)
{
// we should always get here, but check to verify anyways
LLIMModel::getInstance()->addMessage(session_id, SYSTEM_FROM, LLUUID::null, LLTrans::getString("share_alert"), false);
+
+ LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(session_id);
+ if (session_floater && session_floater->isMinimized())
+ {
+ session_floater->setMinimized(false);
+ }
+ LLFloaterIMContainer *im_container = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
+ im_container->selectConversationPair(session_id, true);
}
}
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index 1b3cfb5ebd..98f2ac614b 100755
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -327,6 +327,7 @@ public:
gInventory.updateItem(item);
gInventory.notifyObservers();
+ LLFavoritesOrderStorage::instance().saveOrder();
}
LLView::getWindow()->setCursor(UI_CURSOR_ARROW);
@@ -1641,6 +1642,16 @@ void LLFavoritesOrderStorage::cleanup()
mSortIndexes.swap(aTempMap);
}
+void LLFavoritesOrderStorage::saveOrder()
+{
+ LLInventoryModel::cat_array_t cats;
+ LLInventoryModel::item_array_t items;
+ LLIsType is_type(LLAssetType::AT_LANDMARK);
+ LLUUID favorites_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE);
+ gInventory.collectDescendentsIf(favorites_id, cats, items, LLInventoryModel::EXCLUDE_TRASH, is_type);
+ saveItemsOrder(items);
+}
+
void LLFavoritesOrderStorage::saveItemsOrder( const LLInventoryModel::item_array_t& items )
{
int sortField = 0;
diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h
index 211d3c4ce3..5ca1d3e8ed 100755
--- a/indra/newview/llfavoritesbar.h
+++ b/indra/newview/llfavoritesbar.h
@@ -203,6 +203,8 @@ public:
// Is used to save order for Favorites folder.
void saveItemsOrder(const LLInventoryModel::item_array_t& items);
+ void saveOrder();
+
void rearrangeFavoriteLandmarks(const LLUUID& source_item_id, const LLUUID& target_item_id);
/**
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index ebb44561da..a0df37b309 100755
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -1271,6 +1271,22 @@ bool LLFloaterIMContainer::enableContextMenuItem(const LLSD& userdata)
uuid_vec_t uuids;
getParticipantUUIDs(uuids);
+
+ //If there is group or ad-hoc chat in multiselection, everything needs to be disabled
+ if(uuids.size() > 1)
+ {
+ const std::set<LLFolderViewItem*> selectedItems = mConversationsRoot->getSelectionList();
+ LLConversationItem * conversationItem;
+ for(std::set<LLFolderViewItem*>::const_iterator it = selectedItems.begin(); it != selectedItems.end(); ++it)
+ {
+ conversationItem = static_cast<LLConversationItem *>((*it)->getViewModelItem());
+ if((conversationItem->getType() == LLConversationItem::CONV_SESSION_GROUP) || (conversationItem->getType() == LLConversationItem::CONV_SESSION_AD_HOC))
+ {
+ return false;
+ }
+ }
+ }
+
if ("conversation_log" == item)
{
return gSavedPerAccountSettings.getS32("KeepConversationLogTranscripts") > 0;
@@ -1376,6 +1392,10 @@ bool LLFloaterIMContainer::enableContextMenuItem(const std::string& item, uuid_v
{
return LLAvatarActions::canCall();
}
+ else if ("can_open_voice_conversation" == item)
+ {
+ return is_single_select && LLAvatarActions::canCall();
+ }
else if ("can_zoom_in" == item)
{
return is_single_select && gObjectList.findObject(single_id);
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 7213064746..c094eb3180 100755
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -2776,10 +2776,16 @@ void LLPanelLandAccess::callbackAvatarCBAccess(const uuid_vec_t& ids)
{
LLUUID id = ids[0];
LLParcel* parcel = mParcel->getParcel();
- if (parcel)
+ if (parcel && parcel->addToAccessList(id, 0))
{
- parcel->addToAccessList(id, 0);
- LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(AL_ACCESS);
+ U32 lists_to_update = AL_ACCESS;
+ // agent was successfully added to access list
+ // but we also need to check ban list to ensure that agent will not be in two lists simultaneously
+ if(parcel->removeFromBanList(id))
+ {
+ lists_to_update |= AL_BAN;
+ }
+ LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(lists_to_update);
refresh();
}
}
@@ -2828,10 +2834,16 @@ void LLPanelLandAccess::callbackAvatarCBBanned(const uuid_vec_t& ids)
{
LLUUID id = ids[0];
LLParcel* parcel = mParcel->getParcel();
- if (parcel)
+ if (parcel && parcel->addToBanList(id, 0))
{
- parcel->addToBanList(id, 0);
- LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(AL_BAN);
+ U32 lists_to_update = AL_BAN;
+ // agent was successfully added to ban list
+ // but we also need to check access list to ensure that agent will not be in two lists simultaneously
+ if (parcel->removeFromAccessList(id))
+ {
+ lists_to_update |= AL_ACCESS;
+ }
+ LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(lists_to_update);
refresh();
}
}
diff --git a/indra/newview/llfloaternotificationsconsole.cpp b/indra/newview/llfloaternotificationsconsole.cpp
index c21e4ff7e8..fd03efa061 100755
--- a/indra/newview/llfloaternotificationsconsole.cpp
+++ b/indra/newview/llfloaternotificationsconsole.cpp
@@ -41,6 +41,7 @@ class LLNotificationChannelPanel : public LLLayoutPanel
{
public:
LLNotificationChannelPanel(const Params& p);
+ ~LLNotificationChannelPanel();
BOOL postBuild();
private:
@@ -57,6 +58,20 @@ LLNotificationChannelPanel::LLNotificationChannelPanel(const LLNotificationChann
buildFromFile( "panel_notifications_channel.xml");
}
+LLNotificationChannelPanel::~LLNotificationChannelPanel()
+{
+ // Userdata for all records is a LLNotification* we need to clean up
+ std::vector<LLScrollListItem*> data_list = getChild<LLScrollListCtrl>("notifications_list")->getAllData();
+ std::vector<LLScrollListItem*>::iterator data_itor;
+ for (data_itor = data_list.begin(); data_itor != data_list.end(); ++data_itor)
+ {
+ LLScrollListItem* item = *data_itor;
+ LLNotification* notification = (LLNotification*)item->getUserdata();
+ delete notification;
+ notification = NULL;
+ }
+}
+
BOOL LLNotificationChannelPanel::postBuild()
{
LLButton* header_button = getChild<LLButton>("header");
@@ -124,7 +139,7 @@ bool LLNotificationChannelPanel::update(const LLSD& payload)
row["columns"][2]["type"] = "date";
LLScrollListItem* sli = getChild<LLScrollListCtrl>("notifications_list")->addElement(row);
- sli->setUserdata(&(*notification));
+ sli->setUserdata(new LLNotification(notification->asLLSD()));
}
return false;
diff --git a/indra/newview/llfloatersidepanelcontainer.cpp b/indra/newview/llfloatersidepanelcontainer.cpp
index c5248719e9..aee20ff706 100755
--- a/indra/newview/llfloatersidepanelcontainer.cpp
+++ b/indra/newview/llfloatersidepanelcontainer.cpp
@@ -57,7 +57,7 @@ void LLFloaterSidePanelContainer::onOpen(const LLSD& key)
getChild<LLPanel>(sMainPanelName)->onOpen(key);
}
-void LLFloaterSidePanelContainer::onClickCloseBtn(bool)
+void LLFloaterSidePanelContainer::closeFloater(bool app_quitting)
{
LLPanelOutfitEdit* panel_outfit_edit =
dynamic_cast<LLPanelOutfitEdit*>(LLFloaterSidePanelContainer::getPanel("appearance", "panel_outfit_edit"));
@@ -75,7 +75,7 @@ void LLFloaterSidePanelContainer::onClickCloseBtn(bool)
}
}
- LLFloater::onClickCloseBtn();
+ LLFloater::closeFloater(app_quitting);
}
LLPanel* LLFloaterSidePanelContainer::openChildPanel(const std::string& panel_name, const LLSD& params)
diff --git a/indra/newview/llfloatersidepanelcontainer.h b/indra/newview/llfloatersidepanelcontainer.h
index 13b17e8867..d7ecd52e57 100755
--- a/indra/newview/llfloatersidepanelcontainer.h
+++ b/indra/newview/llfloatersidepanelcontainer.h
@@ -51,7 +51,7 @@ public:
/*virtual*/ void onOpen(const LLSD& key);
- /*virtual*/ void onClickCloseBtn(bool app_quitting = false);
+ /*virtual*/ void closeFloater(bool app_quitting = false);
LLPanel* openChildPanel(const std::string& panel_name, const LLSD& params);
diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp
index bd5d2207b4..7477b02867 100755
--- a/indra/newview/llfloatertools.cpp
+++ b/indra/newview/llfloatertools.cpp
@@ -888,6 +888,9 @@ void LLFloaterTools::onClose(bool app_quitting)
// hide the advanced object weights floater
LLFloaterReg::hideInstance("object_weights");
+
+ // prepare content for next call
+ mPanelContents->clearContents();
}
void click_popup_info(void*)
diff --git a/indra/newview/llfloaterurlentry.cpp b/indra/newview/llfloaterurlentry.cpp
index e85d849c9a..b8136d4a85 100755
--- a/indra/newview/llfloaterurlentry.cpp
+++ b/indra/newview/llfloaterurlentry.cpp
@@ -205,6 +205,10 @@ void LLFloaterURLEntry::onBtnOK( void* userdata )
LLURLHistory::addURL("parcel", media_url);
}
+ // show progress bar here?
+ getWindow()->incBusyCount();
+ self->getChildView("loading_label")->setVisible( true);
+
// leading whitespace causes problems with the MIME-type detection so strip it
LLStringUtil::trim( media_url );
@@ -234,10 +238,6 @@ void LLFloaterURLEntry::onBtnOK( void* userdata )
self->getChildView("ok_btn")->setEnabled(false);
self->getChildView("cancel_btn")->setEnabled(false);
self->getChildView("media_entry")->setEnabled(false);
-
- // show progress bar here?
- getWindow()->incBusyCount();
- self->getChildView("loading_label")->setVisible( true);
}
// static
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 49fff61721..60a95741b3 100755
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -2264,6 +2264,9 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
&& (LLToolDragAndDrop::SOURCE_AGENT == source);
BOOL accept = FALSE;
+ U64 filter_types = filter->getFilterTypes();
+ BOOL use_filter = filter_types && (filter_types&LLInventoryFilter::FILTERTYPE_DATE || (filter_types&LLInventoryFilter::FILTERTYPE_OBJECT)==0);
+
if (is_agent_inventory)
{
const LLUUID &trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH, false);
@@ -2462,7 +2465,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
is_movable = active_folder_view != NULL;
}
- if (is_movable)
+ if (is_movable && use_filter)
{
// Check whether the folder being dragged from active inventory panel
// passes the filter of the destination panel.
@@ -2636,6 +2639,12 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id,
BOOL accept = FALSE;
BOOL is_move = FALSE;
+ BOOL use_filter = FALSE;
+ if (filter)
+ {
+ U64 filter_types = filter->getFilterTypes();
+ use_filter = filter_types && (filter_types&LLInventoryFilter::FILTERTYPE_DATE || (filter_types&LLInventoryFilter::FILTERTYPE_OBJECT)==0);
+ }
// coming from a task. Need to figure out if the person can
// move/copy this item.
@@ -2668,7 +2677,7 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id,
accept = TRUE;
}
- if (filter && accept)
+ if (accept && use_filter)
{
accept = filter->check(item);
}
@@ -3242,7 +3251,7 @@ void LLFolderBridge::pasteFromClipboard()
{
if (move_is_into_current_outfit || move_is_into_outfit)
{
- if (can_move_to_outfit(item, move_is_into_current_outfit))
+ if (item && can_move_to_outfit(item, move_is_into_current_outfit))
{
dropToOutfit(item, move_is_into_current_outfit);
}
@@ -3994,6 +4003,10 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
LLToolDragAndDrop::ESource source = LLToolDragAndDrop::getInstance()->getSource();
BOOL accept = FALSE;
+ U64 filter_types = filter->getFilterTypes();
+ // We shouldn't allow to drop non recent items into recent tab (or some similar transactions)
+ // while we are allowing to interact with regular filtered inventory
+ BOOL use_filter = filter_types && (filter_types&LLInventoryFilter::FILTERTYPE_DATE || (filter_types&LLInventoryFilter::FILTERTYPE_OBJECT)==0);
LLViewerObject* object = NULL;
if(LLToolDragAndDrop::SOURCE_AGENT == source)
{
@@ -4092,7 +4105,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
// Check whether the item being dragged from active inventory panel
// passes the filter of the destination panel.
- if (accept && active_panel)
+ if (accept && active_panel && use_filter)
{
LLFolderViewItem* fv_item = active_panel->getItemByID(inv_item->getUUID());
if (!fv_item) return false;
@@ -4230,7 +4243,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
// Check whether the item being dragged from in world
// passes the filter of the destination panel.
- if (accept)
+ if (accept && use_filter)
{
accept = filter->check(inv_item);
}
@@ -4274,7 +4287,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
// Check whether the item being dragged from notecard
// passes the filter of the destination panel.
- if (accept)
+ if (accept && use_filter)
{
accept = filter->check(inv_item);
}
@@ -4314,7 +4327,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
// Check whether the item being dragged from the library
// passes the filter of the destination panel.
- if (accept && active_panel)
+ if (accept && active_panel && use_filter)
{
LLFolderViewItem* fv_item = active_panel->getItemByID(inv_item->getUUID());
if (!fv_item) return false;
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index 000eee3317..370392b2f2 100755
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -177,6 +177,7 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent
// Pass if this item's type is of the correct filter type
if (filterTypes & FILTERTYPE_OBJECT)
{
+
// If it has no type, pass it, unless it's a link.
if (object_type == LLInventoryType::IT_NONE)
{
@@ -244,13 +245,25 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent
bool is_hidden_if_empty = LLViewerFolderType::lookupIsHiddenIfEmpty(listener->getPreferredType());
if (is_hidden_if_empty)
{
- // Force the fetching of those folders so they are hidden iff they really are empty...
+ // Force the fetching of those folders so they are hidden if they really are empty...
gInventory.fetchDescendentsOf(object_id);
- return FALSE;
+
+ LLInventoryModel::cat_array_t* cat_array = NULL;
+ LLInventoryModel::item_array_t* item_array = NULL;
+ gInventory.getDirectDescendentsOf(object_id,cat_array,item_array);
+ S32 descendents_actual = 0;
+ if(cat_array && item_array)
+ {
+ descendents_actual = cat_array->size() + item_array->size();
+ }
+ if (descendents_actual == 0)
+ {
+ return FALSE;
+ }
}
}
}
-
+
return TRUE;
}
@@ -972,6 +985,11 @@ void LLInventoryFilter::fromParams(const Params& params)
setDateRangeLastLogoff(params.since_logoff);
}
+U64 LLInventoryFilter::getFilterTypes() const
+{
+ return mFilterOps.mFilterTypes;
+}
+
U64 LLInventoryFilter::getFilterObjectTypes() const
{
return mFilterOps.mFilterObjectTypes;
diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h
index ce516af0b9..094fda7707 100755
--- a/indra/newview/llinventoryfilter.h
+++ b/indra/newview/llinventoryfilter.h
@@ -151,6 +151,7 @@ public:
// +-------------------------------------------------------------------+
// + Parameters
// +-------------------------------------------------------------------+
+ U64 getFilterTypes() const;
U64 getFilterObjectTypes() const;
U64 getFilterCategoryTypes() const;
U64 getFilterWearableTypes() const;
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index f16b9330be..25e4be172b 100755
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -877,7 +877,7 @@ bool LLFindWearablesEx::operator()(LLInventoryCategory* cat, LLInventoryItem* it
if (!vitem) return false;
// Skip non-wearables.
- if (!vitem->isWearableType() && vitem->getType() != LLAssetType::AT_OBJECT)
+ if (!vitem->isWearableType() && vitem->getType() != LLAssetType::AT_OBJECT && vitem->getType() != LLAssetType::AT_GESTURE)
{
return false;
}
diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp
index 1948475530..c5c5d10a0c 100755
--- a/indra/newview/lllocalbitmaps.cpp
+++ b/indra/newview/lllocalbitmaps.cpp
@@ -61,7 +61,9 @@
#include "llnotificationsutil.h"
#include "pipeline.h"
#include "llmaterialmgr.h"
-
+#include "llimagedimensionsinfo.h"
+#include "llviewercontrol.h"
+#include "lltrans.h"
/*=======================================*/
/* Formal declarations, constants, etc. */
/*=======================================*/
@@ -836,6 +838,12 @@ bool LLLocalBitmapMgr::addUnit()
std::string filename = picker.getFirstFile();
while(!filename.empty())
{
+ if(!checkTextureDimensions(filename))
+ {
+ filename = picker.getNextFile();
+ continue;
+ }
+
LLLocalBitmap* unit = new LLLocalBitmap(filename);
if (unit->getValid())
@@ -865,6 +873,37 @@ bool LLLocalBitmapMgr::addUnit()
return add_successful;
}
+bool LLLocalBitmapMgr::checkTextureDimensions(std::string filename)
+{
+ std::string exten = gDirUtilp->getExtension(filename);
+ U32 codec = LLImageBase::getCodecFromExtension(exten);
+ std::string mImageLoadError;
+ LLImageDimensionsInfo image_info;
+ if (!image_info.load(filename,codec))
+ {
+ return false;
+ }
+
+ S32 max_width = gSavedSettings.getS32("max_texture_dimension_X");
+ S32 max_height = gSavedSettings.getS32("max_texture_dimension_Y");
+
+ if ((image_info.getWidth() > max_width) || (image_info.getHeight() > max_height))
+ {
+ LLStringUtil::format_map_t args;
+ args["WIDTH"] = llformat("%d", max_width);
+ args["HEIGHT"] = llformat("%d", max_height);
+ mImageLoadError = LLTrans::getString("texture_load_dimensions_error", args);
+
+ LLSD notif_args;
+ notif_args["REASON"] = mImageLoadError;
+ LLNotificationsUtil::add("CannotUploadTexture", notif_args);
+
+ return false;
+ }
+
+ return true;
+}
+
void LLLocalBitmapMgr::delUnit(LLUUID tracking_id)
{
if (!sBitmapList.empty())
diff --git a/indra/newview/lllocalbitmaps.h b/indra/newview/lllocalbitmaps.h
index 47c077dcab..aeb7325685 100755
--- a/indra/newview/lllocalbitmaps.h
+++ b/indra/newview/lllocalbitmaps.h
@@ -119,6 +119,7 @@ class LLLocalBitmapMgr
public:
static bool addUnit();
static void delUnit(LLUUID tracking_id);
+ static bool checkTextureDimensions(std::string filename);
static LLUUID getWorldID(LLUUID tracking_id);
static std::string getFilename(LLUUID tracking_id);
diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp
index bbcdcb126d..0935691ebc 100755
--- a/indra/newview/llmanip.cpp
+++ b/indra/newview/llmanip.cpp
@@ -62,7 +62,7 @@ F32 LLManip::sHelpTextFadeTime = 2.f;
S32 LLManip::sNumTimesHelpTextShown = 0;
S32 LLManip::sMaxTimesShowHelpText = 5;
F32 LLManip::sGridMaxSubdivisionLevel = 32.f;
-F32 LLManip::sGridMinSubdivisionLevel = 1.f;
+F32 LLManip::sGridMinSubdivisionLevel = 1.f / 32.f;
LLVector2 LLManip::sTickLabelSpacing(60.f, 25.f);
@@ -176,7 +176,7 @@ BOOL LLManip::getManipAxis(LLViewerObject* object, EManipPart manip, LLVector3 &
return TRUE;
}
-F32 LLManip::getSubdivisionLevel(const LLVector3 &reference_point, const LLVector3 &translate_axis, F32 grid_scale, S32 min_pixel_spacing)
+F32 LLManip::getSubdivisionLevel(const LLVector3 &reference_point, const LLVector3 &translate_axis, F32 grid_scale, S32 min_pixel_spacing, F32 min_subdivisions, F32 max_subdivisions)
{
//update current snap subdivision level
LLVector3 cam_to_reference;
@@ -192,7 +192,8 @@ F32 LLManip::getSubdivisionLevel(const LLVector3 &reference_point, const LLVecto
F32 projected_translation_axis_length = (translate_axis % cam_to_reference).magVec();
F32 subdivisions = llmax(projected_translation_axis_length * grid_scale / (current_range / LLViewerCamera::getInstance()->getPixelMeterRatio() * min_pixel_spacing), 0.f);
- subdivisions = llclamp((F32)pow(2.f, llfloor(log(subdivisions) / log(2.f))), 1.f / 32.f, 32.f);
+ // figure out nearest power of 2 that subdivides grid_scale with result > min_pixel_spacing
+ subdivisions = llclamp((F32)pow(2.f, llfloor(log(subdivisions) / log(2.f))), min_subdivisions, max_subdivisions);
return subdivisions;
}
@@ -548,37 +549,31 @@ void LLManip::renderTickValue(const LLVector3& pos, F32 value, const std::string
BOOL hud_selection = mObjectSelection->getSelectType() == SELECT_TYPE_HUD;
gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.pushMatrix();
- LLVector3 render_pos = pos;
- if (hud_selection)
{
- F32 zoom_amt = gAgentCamera.mHUDCurZoom;
- F32 inv_zoom_amt = 1.f / zoom_amt;
- // scale text back up to counter-act zoom level
- render_pos = pos * zoom_amt;
- gGL.scalef(inv_zoom_amt, inv_zoom_amt, inv_zoom_amt);
- }
-
- LLColor4 shadow_color = LLColor4::black;
- shadow_color.mV[VALPHA] = color.mV[VALPHA] * 0.5f;
+ LLVector3 render_pos = pos;
+ if (hud_selection)
+ {
+ F32 zoom_amt = gAgentCamera.mHUDCurZoom;
+ F32 inv_zoom_amt = 1.f / zoom_amt;
+ // scale text back up to counter-act zoom level
+ render_pos = pos * zoom_amt;
+ gGL.scalef(inv_zoom_amt, inv_zoom_amt, inv_zoom_amt);
+ }
- if (fractional_portion != 0)
- {
- fraction_string = llformat("%c%02d%s", LLResMgr::getInstance()->getDecimalPoint(), fractional_portion, suffix.c_str());
+ LLColor4 shadow_color = LLColor4::black;
+ shadow_color.mV[VALPHA] = color.mV[VALPHA] * 0.5f;
- gViewerWindow->setup3DViewport(1, -1);
- hud_render_utf8text(val_string, render_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -1.f * big_fontp->getWidthF32(val_string), 3.f, shadow_color, hud_selection);
- hud_render_utf8text(fraction_string, render_pos, *small_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, 1.f, 3.f, shadow_color, hud_selection);
+ if (fractional_portion != 0)
+ {
+ fraction_string = llformat("%c%02d%s", LLResMgr::getInstance()->getDecimalPoint(), fractional_portion, suffix.c_str());
- gViewerWindow->setup3DViewport();
- hud_render_utf8text(val_string, render_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -1.f * big_fontp->getWidthF32(val_string), 3.f, color, hud_selection);
- hud_render_utf8text(fraction_string, render_pos, *small_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, 1.f, 3.f, color, hud_selection);
- }
- else
- {
- gViewerWindow->setup3DViewport(1, -1);
- hud_render_utf8text(val_string, render_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(val_string), 3.f, shadow_color, hud_selection);
- gViewerWindow->setup3DViewport();
- hud_render_utf8text(val_string, render_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(val_string), 3.f, color, hud_selection);
+ hud_render_utf8text(val_string, render_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW, -1.f * big_fontp->getWidthF32(val_string), 3.f, color, hud_selection);
+ hud_render_utf8text(fraction_string, render_pos, *small_fontp, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW, 1.f, 3.f, color, hud_selection);
+ }
+ else
+ {
+ hud_render_utf8text(val_string, render_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW, -0.5f * big_fontp->getWidthF32(val_string), 3.f, color, hud_selection);
+ }
}
gGL.popMatrix();
}
diff --git a/indra/newview/llmanip.h b/indra/newview/llmanip.h
index 6263e4244f..1fb05e047a 100755
--- a/indra/newview/llmanip.h
+++ b/indra/newview/llmanip.h
@@ -137,7 +137,7 @@ protected:
LLVector3 getPivotPoint();
void getManipNormal(LLViewerObject* object, EManipPart manip, LLVector3 &normal);
BOOL getManipAxis(LLViewerObject* object, EManipPart manip, LLVector3 &axis);
- F32 getSubdivisionLevel(const LLVector3 &reference_point, const LLVector3 &translate_axis, F32 grid_scale, S32 min_pixel_spacing = MIN_DIVISION_PIXEL_WIDTH);
+ F32 getSubdivisionLevel(const LLVector3 &reference_point, const LLVector3 &translate_axis, F32 grid_scale, S32 min_pixel_spacing = MIN_DIVISION_PIXEL_WIDTH, F32 min_subdivisions = sGridMinSubdivisionLevel, F32 max_subdivisions = sGridMaxSubdivisionLevel);
void renderTickValue(const LLVector3& pos, F32 value, const std::string& suffix, const LLColor4 &color);
void renderTickText(const LLVector3& pos, const std::string& suffix, const LLColor4 &color);
void updateGridSettings();
diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp
index 506366aba6..1f0546c84b 100755
--- a/indra/newview/llmanipscale.cpp
+++ b/indra/newview/llmanipscale.cpp
@@ -185,12 +185,15 @@ LLManipScale::LLManipScale( LLToolComposite* composite )
mLastUpdateFlags( 0 ),
mScaleSnapUnit1(1.f),
mScaleSnapUnit2(1.f),
+ mGridScale1(1.f),
+ mGridScale2(1.f),
mSnapRegimeOffset(0.f),
mTickPixelSpacing1(0.f),
mTickPixelSpacing2(0.f),
mSnapGuideLength(0.f),
mInSnapRegime(FALSE),
- mScaleSnappedValue(0.f)
+ mScaleSnappedValue1(0.f),
+ mScaleSnappedValue2(0.f)
{
for (S32 i = 0; i < NUM_MANIPULATORS; i++)
{
@@ -291,19 +294,16 @@ void LLManipScale::render()
{
LLGLEnable poly_offset(GL_POLYGON_OFFSET_FILL);
glPolygonOffset( -2.f, -2.f);
+ {
- // JC - Band-aid until edge stretch working similar to side stretch
- // in non-uniform.
- // renderEdges( bbox );
-
- renderCorners( bbox );
- renderFaces( bbox );
+ renderCorners( bbox );
+ renderFaces( bbox );
- if (mManipPart != LL_NO_PART)
- {
- renderGuidelinesPart( bbox );
+ if (mManipPart != LL_NO_PART)
+ {
+ //renderGuidelinesPart( bbox );
+ }
}
-
glPolygonOffset( 0.f, 0.f);
}
}
@@ -311,6 +311,7 @@ void LLManipScale::render()
if (mManipPart != LL_NO_PART)
{
+ renderGuideline( bbox );
renderSnapGuides(bbox);
}
gGL.popMatrix();
@@ -348,7 +349,9 @@ BOOL LLManipScale::handleMouseDownOnPart( S32 x, S32 y, MASK mask )
LLBBox bbox = LLSelectMgr::getInstance()->getBBoxOfSelection();
LLVector3 box_center_agent = bbox.getCenterAgent();
- LLVector3 box_corner_agent = bbox.localToAgent( unitVectorToLocalBBoxExtent( partToUnitVector( mManipPart ), bbox ) );
+ LLVector3 unit_vector = partToUnitVector( mManipPart );
+ LLVector3 extent_vector = unitVectorToLocalBBoxExtent( unit_vector, bbox );
+ LLVector3 box_corner_agent = bbox.localToAgent( extent_vector );
updateSnapGuides(bbox);
@@ -876,8 +879,8 @@ void LLManipScale::dragCorner( S32 x, S32 y )
LLBBox bbox = LLSelectMgr::getInstance()->getBBoxOfSelection();
F32 scale_factor = 1.f;
- F32 max_scale = partToMaxScale(mManipPart, bbox);
- F32 min_scale = partToMinScale(mManipPart, bbox);
+ //F32 max_scale = partToMaxScale(mManipPart, bbox);
+ //F32 min_scale = partToMinScale(mManipPart, bbox);
BOOL uniform = LLManipScale::getUniform();
// check for snapping
@@ -892,54 +895,6 @@ void LLManipScale::dragCorner( S32 x, S32 y )
LLVector3 projected_drag_pos1 = inverse_projected_vec(mScaleDir, orthogonal_component(mouse_on_plane1, mSnapGuideDir1));
LLVector3 projected_drag_pos2 = inverse_projected_vec(mScaleDir, orthogonal_component(mouse_on_plane2, mSnapGuideDir2));
- BOOL snap_enabled = gSavedSettings.getBOOL("SnapEnabled");
- if (snap_enabled && (mouse_on_plane1 - projected_drag_pos1) * mSnapGuideDir1 > mSnapRegimeOffset)
- {
- F32 drag_dist = projected_drag_pos1.length();
-
- F32 cur_subdivisions = llclamp(getSubdivisionLevel(mScaleCenter + projected_drag_pos1, mScaleDir, mScaleSnapUnit1, mTickPixelSpacing1), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel);
- F32 snap_dist = mScaleSnapUnit1 / (2.f * cur_subdivisions);
- F32 relative_snap_dist = fmodf(drag_dist + snap_dist, mScaleSnapUnit1 / cur_subdivisions);
-
- mScaleSnappedValue = llclamp((drag_dist - (relative_snap_dist - snap_dist)), min_scale, max_scale);
- scale_factor = mScaleSnappedValue / dist_vec(drag_start_point_agent, drag_start_center_agent);
- mScaleSnappedValue /= mScaleSnapUnit1 * 2.f;
- mInSnapRegime = TRUE;
-
- if (!uniform)
- {
- scale_factor *= 0.5f;
- }
- }
- else if (snap_enabled && (mouse_on_plane2 - projected_drag_pos2) * mSnapGuideDir2 > mSnapRegimeOffset )
- {
- F32 drag_dist = projected_drag_pos2.length();
-
- F32 cur_subdivisions = llclamp(getSubdivisionLevel(mScaleCenter + projected_drag_pos2, mScaleDir, mScaleSnapUnit2, mTickPixelSpacing2), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel);
- F32 snap_dist = mScaleSnapUnit2 / (2.f * cur_subdivisions);
- F32 relative_snap_dist = fmodf(drag_dist + snap_dist, mScaleSnapUnit2 / cur_subdivisions);
-
- mScaleSnappedValue = llclamp((drag_dist - (relative_snap_dist - snap_dist)), min_scale, max_scale);
- scale_factor = mScaleSnappedValue / dist_vec(drag_start_point_agent, drag_start_center_agent);
- mScaleSnappedValue /= mScaleSnapUnit2 * 2.f;
- mInSnapRegime = TRUE;
-
- if (!uniform)
- {
- scale_factor *= 0.5f;
- }
- }
- else
- {
- mInSnapRegime = FALSE;
- scale_factor = t;
- if (!uniform)
- {
- scale_factor = 0.5f + (scale_factor * 0.5f);
- }
- }
-
-
F32 max_scale_factor = get_default_max_prim_scale() / MIN_PRIM_SCALE;
F32 min_scale_factor = MIN_PRIM_SCALE / get_default_max_prim_scale();
@@ -964,7 +919,65 @@ void LLManipScale::dragCorner( S32 x, S32 y )
}
}
- scale_factor = llclamp( scale_factor, min_scale_factor, max_scale_factor );
+ BOOL snap_enabled = gSavedSettings.getBOOL("SnapEnabled");
+ if (snap_enabled && (mouse_on_plane1 - projected_drag_pos1) * mSnapGuideDir1 > mSnapRegimeOffset)
+ {
+ mInSnapRegime = TRUE;
+
+ F32 drag_dist = projected_drag_pos1 * mScaleDir;
+
+ F32 cur_subdivisions = getSubdivisionLevel(mScaleCenter + projected_drag_pos1,
+ mScaleDir,
+ mScaleSnapUnit1,
+ mTickPixelSpacing1,
+ 1.f, //always snap to at least the base grid unit
+ LLManip::sGridMaxSubdivisionLevel);
+ mScaleSnappedValue1 = mGridScale1 / cur_subdivisions * llround(drag_dist * (cur_subdivisions / mScaleSnapUnit1));
+
+ scale_factor = mScaleSnappedValue1 / ((drag_start_point_agent - drag_start_center_agent) * mSnapDir1);
+ scale_factor = llclamp( scale_factor, min_scale_factor, max_scale_factor );
+
+ mScaleSnappedValue2 = scale_factor * ((drag_start_point_agent - drag_start_center_agent) * mSnapDir2);
+
+ scale_factor *= 0.5f;
+ }
+ else if (snap_enabled && (mouse_on_plane2 - projected_drag_pos2) * mSnapGuideDir2 > mSnapRegimeOffset )
+ {
+ mInSnapRegime = TRUE;
+
+ F32 drag_dist = projected_drag_pos2 * mScaleDir;
+
+ F32 cur_subdivisions = getSubdivisionLevel(mScaleCenter + projected_drag_pos2,
+ mScaleDir,
+ mScaleSnapUnit2,
+ mTickPixelSpacing2,
+ 1.f, //always snap to at least the base grid unit
+ LLManip::sGridMaxSubdivisionLevel);
+ mScaleSnappedValue2 = mGridScale2 / cur_subdivisions * llround(drag_dist * (cur_subdivisions / mScaleSnapUnit2));
+
+ scale_factor = mScaleSnappedValue2 / ((drag_start_point_agent - drag_start_center_agent) * mSnapDir2);
+ scale_factor = llclamp( scale_factor, min_scale_factor, max_scale_factor );
+
+ mScaleSnappedValue1 = scale_factor * ((drag_start_point_agent - drag_start_center_agent) * mSnapDir1);
+
+ scale_factor *= 0.5f;
+ }
+ else
+ {
+ mInSnapRegime = FALSE;
+ scale_factor = llclamp( t, min_scale_factor, max_scale_factor );
+
+ if (!uniform)
+ {
+ scale_factor = 0.5f + (scale_factor * 0.5f);
+ }
+ }
+
+ if (LLSelectMgr::getInstance()->getGridMode() != GRID_MODE_WORLD)
+ {
+ mScaleSnappedValue1 /= mGridScale1 * 2.f;
+ mScaleSnappedValue2 /= mGridScale2 * 2.f;
+ }
LLVector3d drag_global = uniform ? mDragStartCenterGlobal : mDragFarHitGlobal;
@@ -1112,14 +1125,14 @@ void LLManipScale::dragFace( S32 x, S32 y )
if (dist_along_scale_line > max_drag_dist)
{
- mScaleSnappedValue = max_drag_dist;
+ mScaleSnappedValue1 = max_drag_dist;
LLVector3 clamp_point = mScaleCenter + max_drag_dist * mScaleDir;
drag_delta.setVec(clamp_point - drag_start_point_agent);
}
else if (dist_along_scale_line < min_drag_dist)
{
- mScaleSnappedValue = min_drag_dist;
+ mScaleSnappedValue1 = min_drag_dist;
LLVector3 clamp_point = mScaleCenter + min_drag_dist * mScaleDir;
drag_delta.setVec(clamp_point - drag_start_point_agent);
@@ -1127,7 +1140,7 @@ void LLManipScale::dragFace( S32 x, S32 y )
else
{
F32 drag_dist = scale_center_to_mouse * mScaleDir;
- F32 cur_subdivisions = llclamp(getSubdivisionLevel(mScaleCenter + mScaleDir * drag_dist, mScaleDir, mScaleSnapUnit1, mTickPixelSpacing1), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel);
+ F32 cur_subdivisions = getSubdivisionLevel(mScaleCenter + mScaleDir * drag_dist, mScaleDir, mScaleSnapUnit1, mTickPixelSpacing1, 1.f, LLManip::sGridMaxSubdivisionLevel);
F32 snap_dist = mScaleSnapUnit1 / (2.f * cur_subdivisions);
F32 relative_snap_dist = fmodf(drag_dist + snap_dist, mScaleSnapUnit1 / cur_subdivisions);
relative_snap_dist -= snap_dist;
@@ -1141,7 +1154,7 @@ void LLManipScale::dragFace( S32 x, S32 y )
drag_dist - max_drag_dist,
drag_dist - min_drag_dist);
- mScaleSnappedValue = drag_dist - relative_snap_dist;
+ mScaleSnappedValue1 = drag_dist - relative_snap_dist;
if (llabs(relative_snap_dist) < snap_dist)
{
@@ -1154,6 +1167,10 @@ void LLManipScale::dragFace( S32 x, S32 y )
drag_delta -= drag_correction;
}
}
+ if (uniform)
+ {
+ mScaleSnappedValue1 *= 2.f;
+ }
}
else
{
@@ -1312,29 +1329,30 @@ void LLManipScale::stretchFace( const LLVector3& drag_start_agent, const LLVecto
}
-void LLManipScale::renderGuidelinesPart( const LLBBox& bbox )
+void LLManipScale::renderGuideline( const LLBBox& bbox )
{
- LLVector3 guideline_start = bbox.getCenterLocal();
-
- LLVector3 guideline_end = unitVectorToLocalBBoxExtent( partToUnitVector( mManipPart ), bbox );
+ F32 max_point_on_scale_line = partToMaxScale(mManipPart, bbox);
- if (!getUniform())
+ S32 pass;
+ for (pass = 0; pass < 3; pass++)
{
- guideline_start = unitVectorToLocalBBoxExtent( -partToUnitVector( mManipPart ), bbox );
- }
+ LLColor4 tick_color = setupSnapGuideRenderPass(pass);
+ LLGLDepthTest gls_depth(pass != 1);
- guideline_end -= guideline_start;
- guideline_end.normVec();
- guideline_end *= LLWorld::getInstance()->getRegionWidthInMeters();
- guideline_end += guideline_start;
+ glLineWidth(2.5f);
- {
- LLGLDepthTest gls_depth(GL_TRUE);
- gl_stippled_line_3d( guideline_start, guideline_end, LLColor4(1.f, 1.f, 1.f, 0.5f) );
- }
- {
- LLGLDepthTest gls_depth(GL_FALSE);
- gl_stippled_line_3d( guideline_start, guideline_end, LLColor4(1.f, 1.f, 1.f, 0.25f) );
+ gGL.begin(LLRender::LINES);
+ {
+ LLVector3 line_start = mScaleCenter;
+ LLVector3 line_end = line_start + (mScaleDir * max_point_on_scale_line);
+
+ gGL.color4fv(tick_color.mV);
+ gGL.vertex3fv(line_start.mV);
+ gGL.vertex3fv(line_end.mV);
+ }
+ gGL.end();
+
+ LLRender2D::setLineWidth(1.f);
}
}
@@ -1399,8 +1417,11 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox)
}
LLVector3 scale_snap = grid_scale;
- mScaleSnapUnit1 = scale_snap.scaleVec(partToUnitVector( mManipPart )).magVec();
+ LLVector3 scale_dir = partToUnitVector( mManipPart );
+ mScaleSnapUnit1 = scale_snap.scaleVec(scale_dir).magVec();
mScaleSnapUnit2 = mScaleSnapUnit1;
+ mGridScale1 = mScaleSnapUnit1;
+ mGridScale2 = mScaleSnapUnit1;
mSnapGuideDir1 *= mSnapGuideDir1 * LLViewerCamera::getInstance()->getUpAxis() > 0.f ? 1.f : -1.f;
mSnapGuideDir2 = mSnapGuideDir1 * -1.f;
mSnapDir1 = mScaleDir;
@@ -1515,30 +1536,30 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox)
case VX:
// x axis face being scaled, use y and z for snap guides
mSnapGuideDir1 = LLVector3::y_axis.scaledVec(axis_flip);
- mScaleSnapUnit1 = grid_scale.mV[VZ];
+ mGridScale1 = grid_scale.mV[VZ];
mSnapGuideDir2 = LLVector3::z_axis.scaledVec(axis_flip);
- mScaleSnapUnit2 = grid_scale.mV[VY];
+ mGridScale2 = grid_scale.mV[VY];
break;
case VY:
// y axis facing being scaled, use x and z for snap guides
mSnapGuideDir1 = LLVector3::x_axis.scaledVec(axis_flip);
- mScaleSnapUnit1 = grid_scale.mV[VZ];
+ mGridScale1 = grid_scale.mV[VZ];
mSnapGuideDir2 = LLVector3::z_axis.scaledVec(axis_flip);
- mScaleSnapUnit2 = grid_scale.mV[VX];
+ mGridScale2 = grid_scale.mV[VX];
break;
case VZ:
// z axis facing being scaled, use x and y for snap guides
mSnapGuideDir1 = LLVector3::x_axis.scaledVec(axis_flip);
- mScaleSnapUnit1 = grid_scale.mV[VY];
+ mGridScale1 = grid_scale.mV[VY];
mSnapGuideDir2 = LLVector3::y_axis.scaledVec(axis_flip);
- mScaleSnapUnit2 = grid_scale.mV[VX];
+ mGridScale2 = grid_scale.mV[VX];
break;
default:
mSnapGuideDir1.zeroVec();
- mScaleSnapUnit1 = 0.f;
+ mGridScale1 = 0.f;
mSnapGuideDir2.zeroVec();
- mScaleSnapUnit2 = 0.f;
+ mGridScale2 = 0.f;
break;
}
@@ -1554,11 +1575,18 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox)
mScalePlaneNormal2 = mSnapGuideDir2 % mScaleDir;
mScalePlaneNormal2.normVec();
- mScaleSnapUnit1 = mScaleSnapUnit1 / (mSnapDir1 * mScaleDir);
- mScaleSnapUnit2 = mScaleSnapUnit2 / (mSnapDir2 * mScaleDir);
+ mScaleSnapUnit1 = mGridScale1 / (mSnapDir1 * mScaleDir);
+ mScaleSnapUnit2 = mGridScale2 / (mSnapDir2 * mScaleDir);
- mTickPixelSpacing1 = llround((F32)MIN_DIVISION_PIXEL_WIDTH / (mScaleDir % mSnapGuideDir1).length());
- mTickPixelSpacing2 = llround((F32)MIN_DIVISION_PIXEL_WIDTH / (mScaleDir % mSnapGuideDir2).length());
+ LLVector3 scale_dir_screen = orthogonal_component(mScaleDir, cam_at_axis);
+ scale_dir_screen.normalize();
+ LLVector3 snap_guide_dir_1_screen = orthogonal_component(mSnapGuideDir1, cam_at_axis);
+ snap_guide_dir_1_screen.normalize();
+ LLVector3 snap_guide_dir_2_screen = orthogonal_component(mSnapGuideDir2, cam_at_axis);
+ snap_guide_dir_2_screen.normalize();
+
+ mTickPixelSpacing1 = llround((F32)MIN_DIVISION_PIXEL_WIDTH / (scale_dir_screen % snap_guide_dir_1_screen).length());
+ mTickPixelSpacing2 = llround((F32)MIN_DIVISION_PIXEL_WIDTH / (scale_dir_screen % snap_guide_dir_2_screen).length());
if (uniform)
{
@@ -1574,74 +1602,47 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox)
return;
}
- F32 max_subdivisions = sGridMaxSubdivisionLevel;
+ F32 max_point_on_scale_line = partToMaxScale(mManipPart, bbox);
F32 grid_alpha = gSavedSettings.getF32("GridOpacity");
- F32 max_point_on_scale_line = partToMaxScale(mManipPart, bbox);
LLVector3 drag_point = gAgent.getPosAgentFromGlobal(mDragPointGlobal);
updateGridSettings();
+ // render tick ruler baselines
S32 pass;
for (pass = 0; pass < 3; pass++)
{
LLColor4 tick_color = setupSnapGuideRenderPass(pass);
+ LLGLDepthTest gls_depth(pass != 1);
gGL.begin(LLRender::LINES);
- LLVector3 line_mid = mScaleCenter + (mScaleSnappedValue * mScaleDir) + (mSnapGuideDir1 * mSnapRegimeOffset);
- LLVector3 line_start = line_mid - (mScaleDir * (llmin(mScaleSnappedValue, mSnapGuideLength * 0.5f)));
- LLVector3 line_end = line_mid + (mScaleDir * llmin(max_point_on_scale_line - mScaleSnappedValue, mSnapGuideLength * 0.5f));
+ {
+ LLVector3 line_start = mScaleCenter + (mSnapGuideDir1 * mSnapRegimeOffset);
+ LLVector3 line_end = line_start + (mScaleDir * max_point_on_scale_line);
- gGL.color4f(tick_color.mV[VRED], tick_color.mV[VGREEN], tick_color.mV[VBLUE], tick_color.mV[VALPHA] * 0.1f);
- gGL.vertex3fv(line_start.mV);
- gGL.color4fv(tick_color.mV);
- gGL.vertex3fv(line_mid.mV);
- gGL.vertex3fv(line_mid.mV);
- gGL.color4f(tick_color.mV[VRED], tick_color.mV[VGREEN], tick_color.mV[VBLUE], tick_color.mV[VALPHA] * 0.1f);
- gGL.vertex3fv(line_end.mV);
-
- line_mid = mScaleCenter + (mScaleSnappedValue * mScaleDir) + (mSnapGuideDir2 * mSnapRegimeOffset);
- line_start = line_mid - (mScaleDir * (llmin(mScaleSnappedValue, mSnapGuideLength * 0.5f)));
- line_end = line_mid + (mScaleDir * llmin(max_point_on_scale_line - mScaleSnappedValue, mSnapGuideLength * 0.5f));
- gGL.vertex3fv(line_start.mV);
- gGL.color4fv(tick_color.mV);
- gGL.vertex3fv(line_mid.mV);
- gGL.vertex3fv(line_mid.mV);
- gGL.color4f(tick_color.mV[VRED], tick_color.mV[VGREEN], tick_color.mV[VBLUE], tick_color.mV[VALPHA] * 0.1f);
- gGL.vertex3fv(line_end.mV);
+ gGL.color4fv(tick_color.mV);
+ gGL.vertex3fv(line_start.mV);
+ gGL.vertex3fv(line_end.mV);
+
+ line_start = mScaleCenter + (mSnapGuideDir2 * mSnapRegimeOffset);
+ line_end = line_start + (mScaleDir * max_point_on_scale_line);
+ gGL.vertex3fv(line_start.mV);
+ gGL.vertex3fv(line_end.mV);
+ }
gGL.end();
}
{
LLGLDepthTest gls_depth(GL_FALSE);
- F32 dist_grid_axis = (drag_point - mScaleCenter) * mScaleDir;
- // find distance to nearest smallest grid unit
- F32 grid_multiple1 = llfloor(llmax(0.f, dist_grid_axis) / (mScaleSnapUnit1 / max_subdivisions));
- F32 grid_multiple2 = llfloor(llmax(0.f, dist_grid_axis) / (mScaleSnapUnit2 / max_subdivisions));
- F32 grid_offset1 = fmodf(dist_grid_axis, mScaleSnapUnit1 / max_subdivisions);
- F32 grid_offset2 = fmodf(dist_grid_axis, mScaleSnapUnit2 / max_subdivisions);
-
- // how many smallest grid units are we away from largest grid scale?
- S32 sub_div_offset_1 = llround(fmod(dist_grid_axis - grid_offset1, mScaleSnapUnit1 / sGridMinSubdivisionLevel) / (mScaleSnapUnit1 / max_subdivisions));
- S32 sub_div_offset_2 = llround(fmod(dist_grid_axis - grid_offset2, mScaleSnapUnit2 / sGridMinSubdivisionLevel) / (mScaleSnapUnit2 / max_subdivisions));
-
- S32 num_ticks_per_side1 = llmax(1, lltrunc(0.5f * mSnapGuideLength / (mScaleSnapUnit1 / max_subdivisions)));
- S32 num_ticks_per_side2 = llmax(1, lltrunc(0.5f * mSnapGuideLength / (mScaleSnapUnit2 / max_subdivisions)));
- F32 dist_scale_units_1 = dist_grid_axis / (mScaleSnapUnit1 / max_subdivisions);
- F32 dist_scale_units_2 = dist_grid_axis / (mScaleSnapUnit2 / max_subdivisions);
- S32 ticks_from_scale_center_1 = lltrunc(dist_scale_units_1);
- S32 ticks_from_scale_center_2 = lltrunc(dist_scale_units_2);
- S32 max_ticks1 = llceil(max_point_on_scale_line / (mScaleSnapUnit1 / max_subdivisions) - dist_scale_units_1);
- S32 max_ticks2 = llceil(max_point_on_scale_line / (mScaleSnapUnit2 / max_subdivisions) - dist_scale_units_2);
- S32 start_tick = 0;
- S32 stop_tick = 0;
+ S32 num_ticks_per_side1 = llmax(1, lltrunc(max_point_on_scale_line / (mScaleSnapUnit1 / sGridMaxSubdivisionLevel)));
+ S32 num_ticks_per_side2 = llmax(1, lltrunc(max_point_on_scale_line / (mScaleSnapUnit2 / sGridMaxSubdivisionLevel)));
if (mInSnapRegime)
{
// draw snap guide line
gGL.begin(LLRender::LINES);
- //LLVector3 snap_line_center = mScaleCenter + (mScaleSnappedValue * mScaleDir);
LLVector3 snap_line_center = bbox.localToAgent(unitVectorToLocalBBoxExtent( partToUnitVector( mManipPart ), bbox ));
LLVector3 snap_line_start = snap_line_center + (mSnapGuideDir1 * mSnapRegimeOffset);
@@ -1654,6 +1655,17 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox)
gGL.vertex3fv(snap_line_end.mV);
gGL.end();
+ F32 arrow_size;
+ if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
+ {
+ arrow_size = 0.02f;
+ }
+ else
+ {
+ arrow_size = 0.01f * dist_vec(snap_line_center, LLViewerCamera::getInstance()->getOrigin());
+ }
+
+
// draw snap guide arrow
gGL.begin(LLRender::TRIANGLES);
{
@@ -1665,15 +1677,15 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox)
arrow_dir = snap_line_start - snap_line_center;
arrow_dir.normVec();
- gGL.vertex3fv((snap_line_start + arrow_dir * mSnapRegimeOffset * 0.1f).mV);
- gGL.vertex3fv((snap_line_start + arrow_span * mSnapRegimeOffset * 0.1f).mV);
- gGL.vertex3fv((snap_line_start - arrow_span * mSnapRegimeOffset * 0.1f).mV);
+ gGL.vertex3fv((snap_line_start + arrow_dir * arrow_size).mV);
+ gGL.vertex3fv((snap_line_start + arrow_span * arrow_size).mV);
+ gGL.vertex3fv((snap_line_start - arrow_span * arrow_size).mV);
arrow_dir = snap_line_end - snap_line_center;
arrow_dir.normVec();
- gGL.vertex3fv((snap_line_end + arrow_dir * mSnapRegimeOffset * 0.1f).mV);
- gGL.vertex3fv((snap_line_end + arrow_span * mSnapRegimeOffset * 0.1f).mV);
- gGL.vertex3fv((snap_line_end - arrow_span * mSnapRegimeOffset * 0.1f).mV);
+ gGL.vertex3fv((snap_line_end + arrow_dir * arrow_size).mV);
+ gGL.vertex3fv((snap_line_end + arrow_span * arrow_size).mV);
+ gGL.vertex3fv((snap_line_end - arrow_span * arrow_size).mV);
}
gGL.end();
}
@@ -1686,35 +1698,32 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox)
for (pass = 0; pass < 3; pass++)
{
LLColor4 tick_color = setupSnapGuideRenderPass(pass);
-
- start_tick = -(llmin(ticks_from_scale_center_1, num_ticks_per_side1));
- stop_tick = llmin(max_ticks1, num_ticks_per_side1);
+ LLGLDepthTest gls_depth(pass != 1);
gGL.begin(LLRender::LINES);
// draw first row of ticks
- for (S32 i = start_tick; i <= stop_tick; i++)
+ for (S32 i = 0; i <= num_ticks_per_side1; i++)
{
- F32 alpha = (1.f - (1.f * ((F32)llabs(i) / (F32)num_ticks_per_side1)));
- LLVector3 tick_pos = mScaleCenter + (mScaleDir * (grid_multiple1 + i) * (mScaleSnapUnit1 / max_subdivisions));
+ LLVector3 tick_pos = mScaleCenter + (mScaleDir * i * (mScaleSnapUnit1 / sGridMaxSubdivisionLevel));
- F32 cur_subdivisions = llclamp(getSubdivisionLevel(tick_pos, mScaleDir, mScaleSnapUnit1, mTickPixelSpacing1), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel);
+ F32 cur_subdivisions = getSubdivisionLevel(tick_pos, mScaleDir, mScaleSnapUnit1, mTickPixelSpacing1);
- if (fmodf((F32)(i + sub_div_offset_1), (max_subdivisions / cur_subdivisions)) != 0.f)
+ if (i != num_ticks_per_side1 && fmodf((F32)i, (sGridMaxSubdivisionLevel / cur_subdivisions)) != 0.f)
{
continue;
}
F32 tick_scale = 1.f;
- for (F32 division_level = max_subdivisions; division_level >= sGridMinSubdivisionLevel; division_level /= 2.f)
+ for (F32 division_level = sGridMaxSubdivisionLevel; division_level >= sGridMinSubdivisionLevel; division_level /= 2.f)
{
- if (fmodf((F32)(i + sub_div_offset_1), division_level) == 0.f)
+ if (fmodf((F32)i, division_level) == 0.f)
{
break;
}
tick_scale *= 0.7f;
}
- gGL.color4f(tick_color.mV[VRED], tick_color.mV[VGREEN], tick_color.mV[VBLUE], tick_color.mV[VALPHA] * alpha);
+ gGL.color4fv(tick_color.mV);
LLVector3 tick_start = tick_pos + (mSnapGuideDir1 * mSnapRegimeOffset);
LLVector3 tick_end = tick_start + (mSnapGuideDir1 * mSnapRegimeOffset * tick_scale);
gGL.vertex3fv(tick_start.mV);
@@ -1722,32 +1731,28 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox)
}
// draw opposite row of ticks
- start_tick = -(llmin(ticks_from_scale_center_2, num_ticks_per_side2));
- stop_tick = llmin(max_ticks2, num_ticks_per_side2);
-
- for (S32 i = start_tick; i <= stop_tick; i++)
+ for (S32 i = 0; i <= num_ticks_per_side2; i++)
{
- F32 alpha = (1.f - (1.f * ((F32)llabs(i) / (F32)num_ticks_per_side2)));
- LLVector3 tick_pos = mScaleCenter + (mScaleDir * (grid_multiple2 + i) * (mScaleSnapUnit2 / max_subdivisions));
+ LLVector3 tick_pos = mScaleCenter + (mScaleDir * i * (mScaleSnapUnit2 / sGridMaxSubdivisionLevel));
- F32 cur_subdivisions = llclamp(getSubdivisionLevel(tick_pos, mScaleDir, mScaleSnapUnit2, mTickPixelSpacing2), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel);
+ F32 cur_subdivisions = getSubdivisionLevel(tick_pos, mScaleDir, mScaleSnapUnit2, mTickPixelSpacing2);
- if (fmodf((F32)(i + sub_div_offset_2), (max_subdivisions / cur_subdivisions)) != 0.f)
+ if (i != num_ticks_per_side1 && fmodf((F32)i, (sGridMaxSubdivisionLevel / cur_subdivisions)) != 0.f)
{
continue;
}
F32 tick_scale = 1.f;
- for (F32 division_level = max_subdivisions; division_level >= sGridMinSubdivisionLevel; division_level /= 2.f)
+ for (F32 division_level = sGridMaxSubdivisionLevel; division_level >= sGridMinSubdivisionLevel; division_level /= 2.f)
{
- if (fmodf((F32)(i + sub_div_offset_2), division_level) == 0.f)
+ if (fmodf((F32)i, division_level) == 0.f)
{
break;
}
tick_scale *= 0.7f;
}
- gGL.color4f(tick_color.mV[VRED], tick_color.mV[VGREEN], tick_color.mV[VBLUE], tick_color.mV[VALPHA] * alpha);
+ gGL.color4fv(tick_color.mV);
LLVector3 tick_start = tick_pos + (mSnapGuideDir2 * mSnapRegimeOffset);
LLVector3 tick_end = tick_start + (mSnapGuideDir2 * mSnapRegimeOffset * tick_scale);
gGL.vertex3fv(tick_start.mV);
@@ -1757,31 +1762,23 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox)
}
// render tick labels
- start_tick = -(llmin(ticks_from_scale_center_1, num_ticks_per_side1));
- stop_tick = llmin(max_ticks1, num_ticks_per_side1);
-
F32 grid_resolution = mObjectSelection->getSelectType() == SELECT_TYPE_HUD ? 0.25f : llmax(gSavedSettings.getF32("GridResolution"), 0.001f);
- S32 label_sub_div_offset_1 = llround(fmod(dist_grid_axis - grid_offset1, mScaleSnapUnit1 * 32.f) / (mScaleSnapUnit1 / max_subdivisions));
- S32 label_sub_div_offset_2 = llround(fmod(dist_grid_axis - grid_offset2, mScaleSnapUnit2 * 32.f) / (mScaleSnapUnit2 / max_subdivisions));
- for (S32 i = start_tick; i <= stop_tick; i++)
+ for (S32 i = 0; i <= num_ticks_per_side1; i++)
{
F32 tick_scale = 1.f;
- F32 alpha = grid_alpha * (1.f - (0.5f * ((F32)llabs(i) / (F32)num_ticks_per_side1)));
- F32 distance = (drag_point - mScaleCenter) * mScaleDir;
- (void) distance;
- LLVector3 tick_pos = mScaleCenter + (mScaleDir * (grid_multiple1 + i) * (mScaleSnapUnit1 / max_subdivisions));
+ LLVector3 tick_pos = mScaleCenter + (mScaleDir * i * (mScaleSnapUnit1 / sGridMaxSubdivisionLevel));
- for (F32 division_level = max_subdivisions; division_level >= sGridMinSubdivisionLevel; division_level /= 2.f)
+ for (F32 division_level = sGridMaxSubdivisionLevel; division_level >= sGridMinSubdivisionLevel; division_level /= 2.f)
{
- if (fmodf((F32)(i + label_sub_div_offset_1), division_level) == 0.f)
+ if (fmodf((F32)i, division_level) == 0.f)
{
break;
}
tick_scale *= 0.7f;
}
- if (fmodf((F32)(i + label_sub_div_offset_1), (max_subdivisions / llmin(sGridMaxSubdivisionLevel, getSubdivisionLevel(tick_pos, mScaleDir, mScaleSnapUnit1, tick_label_spacing)))) == 0.f)
+ if (i == num_ticks_per_side1 || fmodf((F32)i, (sGridMaxSubdivisionLevel / getSubdivisionLevel(tick_pos, mScaleDir, mScaleSnapUnit1, tick_label_spacing))) == 0.f)
{
LLVector3 text_origin = tick_pos +
(mSnapGuideDir1 * mSnapRegimeOffset * (1.f + tick_scale));
@@ -1790,45 +1787,42 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox)
F32 tick_value;
if (grid_mode == GRID_MODE_WORLD)
{
- tick_value = (grid_multiple1 + i) / (max_subdivisions / grid_resolution);
+ tick_value = i / (sGridMaxSubdivisionLevel / grid_resolution);
}
else
{
- tick_value = (grid_multiple1 + i) / (2.f * max_subdivisions);
+ tick_value = i / (2.f * sGridMaxSubdivisionLevel);
}
F32 text_highlight = 0.8f;
- if (is_approx_equal(tick_value, mScaleSnappedValue) && mInSnapRegime)
+ if (is_approx_equal(tick_value, mScaleSnappedValue1) && mInSnapRegime)
{
text_highlight = 1.f;
}
- renderTickValue(text_origin, tick_value, grid_mode == GRID_MODE_WORLD ? std::string("m") : std::string("x"), LLColor4(text_highlight, text_highlight, text_highlight, alpha));
+ renderTickValue(text_origin, tick_value, grid_mode == GRID_MODE_WORLD ? "m" : "x", LLColor4(text_highlight, text_highlight, text_highlight, grid_alpha));
}
}
// label ticks on opposite side
if (mScaleSnapUnit2 != mScaleSnapUnit1)
{
- start_tick = -(llmin(ticks_from_scale_center_2, num_ticks_per_side2));
- stop_tick = llmin(max_ticks2, num_ticks_per_side2);
- for (S32 i = start_tick; i <= stop_tick; i++)
+ for (S32 i = 0; i <= num_ticks_per_side2; i++)
{
F32 tick_scale = 1.f;
- F32 alpha = grid_alpha * (1.f - (0.5f * ((F32)llabs(i) / (F32)num_ticks_per_side2)));
- LLVector3 tick_pos = mScaleCenter + (mScaleDir * (grid_multiple2 + i) * (mScaleSnapUnit2 / max_subdivisions));
+ LLVector3 tick_pos = mScaleCenter + (mScaleDir * i * (mScaleSnapUnit2 / sGridMaxSubdivisionLevel));
- for (F32 division_level = max_subdivisions; division_level >= sGridMinSubdivisionLevel; division_level /= 2.f)
+ for (F32 division_level = sGridMaxSubdivisionLevel; division_level >= sGridMinSubdivisionLevel; division_level /= 2.f)
{
- if (fmodf((F32)(i + label_sub_div_offset_2), division_level) == 0.f)
+ if (fmodf(i, division_level) == 0.f)
{
break;
}
tick_scale *= 0.7f;
}
- if (fmodf((F32)(i + label_sub_div_offset_2), (max_subdivisions / llmin(max_subdivisions, getSubdivisionLevel(tick_pos, mScaleDir, mScaleSnapUnit2, tick_label_spacing)))) == 0.f)
+ if (i == num_ticks_per_side2 || fmodf((F32)i, (sGridMaxSubdivisionLevel / getSubdivisionLevel(tick_pos, mScaleDir, mScaleSnapUnit2, tick_label_spacing))) == 0.f)
{
LLVector3 text_origin = tick_pos +
(mSnapGuideDir2 * mSnapRegimeOffset * (1.f + tick_scale));
@@ -1837,21 +1831,21 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox)
F32 tick_value;
if (grid_mode == GRID_MODE_WORLD)
{
- tick_value = (grid_multiple2 + i) / (max_subdivisions / grid_resolution);
+ tick_value = i / (sGridMaxSubdivisionLevel / grid_resolution);
}
else
{
- tick_value = (grid_multiple2 + i) / (2.f * max_subdivisions);
+ tick_value = i / (2.f * sGridMaxSubdivisionLevel);
}
F32 text_highlight = 0.8f;
- if (is_approx_equal(tick_value, mScaleSnappedValue) && mInSnapRegime)
+ if (is_approx_equal(tick_value, mScaleSnappedValue2) && mInSnapRegime)
{
text_highlight = 1.f;
}
- renderTickValue(text_origin, tick_value, grid_mode == GRID_MODE_WORLD ? std::string("m") : std::string("x"), LLColor4(text_highlight, text_highlight, text_highlight, alpha));
+ renderTickValue(text_origin, tick_value, grid_mode == GRID_MODE_WORLD ? "m" : "x", LLColor4(text_highlight, text_highlight, text_highlight, grid_alpha));
}
}
}
diff --git a/indra/newview/llmanipscale.h b/indra/newview/llmanipscale.h
index 079fda76ce..916213ea0d 100755
--- a/indra/newview/llmanipscale.h
+++ b/indra/newview/llmanipscale.h
@@ -92,7 +92,7 @@ private:
void renderEdges( const LLBBox& local_bbox );
void renderBoxHandle( F32 x, F32 y, F32 z );
void renderAxisHandle( U32 part, const LLVector3& start, const LLVector3& end );
- void renderGuidelinesPart( const LLBBox& local_bbox );
+ void renderGuideline( const LLBBox& local_bbox );
void renderSnapGuides( const LLBBox& local_bbox );
void revert();
@@ -149,6 +149,8 @@ private:
LLVector4 mManipulatorVertices[14];
F32 mScaleSnapUnit1; // size of snap multiples for axis 1
F32 mScaleSnapUnit2; // size of snap multiples for axis 2
+ F32 mGridScale1;
+ F32 mGridScale2;
LLVector3 mScalePlaneNormal1; // normal of plane in which scale occurs that most faces camera
LLVector3 mScalePlaneNormal2; // normal of plane in which scale occurs that most faces camera
LLVector3 mSnapGuideDir1;
@@ -161,7 +163,8 @@ private:
F32 mSnapGuideLength;
LLVector3 mScaleCenter;
LLVector3 mScaleDir;
- F32 mScaleSnappedValue;
+ F32 mScaleSnappedValue1,
+ mScaleSnappedValue2;
BOOL mInSnapRegime;
F32 mManipulatorScales[NUM_MANIPULATORS];
F32 mBoxHandleSize[NUM_MANIPULATORS]; // The size of the handles at the corners of the bounding box
diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp
index 0518ddf88d..e5d63e6957 100755
--- a/indra/newview/llmaniptranslate.cpp
+++ b/indra/newview/llmaniptranslate.cpp
@@ -375,7 +375,7 @@ BOOL LLManipTranslate::handleMouseDownOnPart( S32 x, S32 y, MASK mask )
//LLVector3 select_center_agent = gAgent.getPosAgentFromGlobal(LLSelectMgr::getInstance()->getSelectionCenterGlobal());
// TomY: The above should (?) be identical to the below
LLVector3 select_center_agent = getPivotPoint();
- mSubdivisions = llclamp(getSubdivisionLevel(select_center_agent, axis_exists ? axis : LLVector3::z_axis, getMinGridScale()), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel);
+ mSubdivisions = getSubdivisionLevel(select_center_agent, axis_exists ? axis : LLVector3::z_axis, getMinGridScale());
// if we clicked on a planar manipulator, recenter mouse cursor
if (mManipPart >= LL_YZ_PLANE && mManipPart <= LL_XY_PLANE)
@@ -517,7 +517,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
LLSelectMgr::getInstance()->updateSelectionCenter();
LLVector3d current_pos_global = gAgent.getPosGlobalFromAgent(getPivotPoint());
- mSubdivisions = llclamp(getSubdivisionLevel(getPivotPoint(), axis_f, getMinGridScale()), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel);
+ mSubdivisions = getSubdivisionLevel(getPivotPoint(), axis_f, getMinGridScale());
// Project the cursor onto that plane
LLVector3d relative_move;
@@ -607,7 +607,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
max_grid_scale = mGridScale.mV[VZ];
}
- F32 num_subdivisions = llclamp(getSubdivisionLevel(getPivotPoint(), camera_projected_dir, max_grid_scale), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel);
+ F32 num_subdivisions = getSubdivisionLevel(getPivotPoint(), camera_projected_dir, max_grid_scale);
F32 grid_scale_a;
F32 grid_scale_b;
@@ -1255,6 +1255,7 @@ void LLManipTranslate::renderSnapGuides()
for (S32 pass = 0; pass < 3; pass++)
{
LLColor4 line_color = setupSnapGuideRenderPass(pass);
+ LLGLDepthTest gls_depth(pass != 1);
gGL.begin(LLRender::LINES);
{
@@ -1286,7 +1287,7 @@ void LLManipTranslate::renderSnapGuides()
{
tick_start = selection_center + (translate_axis * (smallest_grid_unit_scale * (F32)i - offset_nearest_grid_unit));
- F32 cur_subdivisions = llclamp(getSubdivisionLevel(tick_start, translate_axis, getMinGridScale()), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel);
+ F32 cur_subdivisions = getSubdivisionLevel(tick_start, translate_axis, getMinGridScale());
if (fmodf((F32)(i + sub_div_offset), (max_subdivisions / cur_subdivisions)) != 0.f)
{
@@ -1384,7 +1385,7 @@ void LLManipTranslate::renderSnapGuides()
tick_scale *= 0.7f;
}
- if (fmodf((F32)(i + sub_div_offset), (max_subdivisions / llmin(sGridMaxSubdivisionLevel, getSubdivisionLevel(tick_pos, translate_axis, getMinGridScale(), tick_label_spacing)))) == 0.f)
+ if (fmodf((F32)(i + sub_div_offset), (max_subdivisions / getSubdivisionLevel(tick_pos, translate_axis, getMinGridScale(), tick_label_spacing))) == 0.f)
{
F32 snap_offset_meters;
diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp
index 1a427338e5..13ab7d7f27 100755
--- a/indra/newview/llpanelcontents.cpp
+++ b/indra/newview/llpanelcontents.cpp
@@ -141,6 +141,13 @@ void LLPanelContents::refresh()
}
}
+void LLPanelContents::clearContents()
+{
+ if (mPanelInventoryObject)
+ {
+ mPanelInventoryObject->clearInventoryTask();
+ }
+}
//
diff --git a/indra/newview/llpanelcontents.h b/indra/newview/llpanelcontents.h
index ad62e13bc2..6ecc78afa0 100755
--- a/indra/newview/llpanelcontents.h
+++ b/indra/newview/llpanelcontents.h
@@ -48,6 +48,7 @@ public:
virtual ~LLPanelContents();
void refresh();
+ void clearContents();
static void onClickNewScript(void*);
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index daa7df682b..bf8a9d7ff5 100755
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -860,10 +860,8 @@ void LLPanelEditWearable::draw()
void LLPanelEditWearable::onClose()
{
- if ( isDirty() )
- {
- revertChanges();
- }
+ // any unsaved changes should be reverted at this point
+ revertChanges();
}
void LLPanelEditWearable::setVisible(BOOL visible)
@@ -951,7 +949,7 @@ void LLPanelEditWearable::onCommitSexChange()
gAgentAvatarp->updateSexDependentLayerSets( FALSE );
gAgentAvatarp->updateVisualParams();
-
+ showWearable(mWearablePtr, TRUE, TRUE);
updateScrollingPanelUI();
}
diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp
index dd13e8abf4..7b8ed9c631 100755
--- a/indra/newview/llpanelgroupinvite.cpp
+++ b/indra/newview/llpanelgroupinvite.cpp
@@ -260,7 +260,7 @@ void LLPanelGroupInvite::impl::addRoleNames(LLGroupMgrGroupData* gdatap)
//else if they have the limited add to roles power
//we add every role the user is in
//else we just add to everyone
- bool is_owner = member_data->isInRole(gdatap->mOwnerRole);
+ bool is_owner = member_data->isOwner();
bool can_assign_any = gAgent.hasPowerInGroup(mGroupID,
GP_ROLE_ASSIGN_MEMBER);
bool can_assign_limited = gAgent.hasPowerInGroup(mGroupID,
@@ -579,7 +579,7 @@ void LLPanelGroupInvite::updateLists()
{
waiting = true;
}
- if (gdatap->isRoleDataComplete() && gdatap->isMemberDataComplete())
+ if (gdatap->isRoleDataComplete() && gdatap->isMemberDataComplete() && gdatap->isRoleMemberDataComplete())
{
if ( mImplementation->mRoleNames )
{
@@ -607,6 +607,7 @@ void LLPanelGroupInvite::updateLists()
{
LLGroupMgr::getInstance()->sendGroupPropertiesRequest(mImplementation->mGroupID);
LLGroupMgr::getInstance()->sendGroupRoleDataRequest(mImplementation->mGroupID);
+ LLGroupMgr::getInstance()->sendGroupRoleMembersRequest(mImplementation->mGroupID);
LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mImplementation->mGroupID);
}
mPendingUpdate = TRUE;
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index 61fa4ea959..d12c6bccb6 100755
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -1768,7 +1768,7 @@ LLPanelGroupRolesSubTab::LLPanelGroupRolesSubTab()
mMemberVisibleCheck(NULL),
mDeleteRoleButton(NULL),
mCreateRoleButton(NULL),
-
+ mFirstOpen(TRUE),
mHasRoleChange(FALSE)
{
}
@@ -1870,6 +1870,7 @@ void LLPanelGroupRolesSubTab::deactivate()
LL_DEBUGS() << "LLPanelGroupRolesSubTab::deactivate()" << LL_ENDL;
LLPanelGroupSubTab::deactivate();
+ mFirstOpen = FALSE;
}
bool LLPanelGroupRolesSubTab::needsApply(std::string& mesg)
@@ -1887,7 +1888,7 @@ bool LLPanelGroupRolesSubTab::apply(std::string& mesg)
LL_DEBUGS() << "LLPanelGroupRolesSubTab::apply()" << LL_ENDL;
saveRoleChanges(true);
-
+ mFirstOpen = FALSE;
LLGroupMgr::getInstance()->sendGroupRoleChanges(mGroupID);
notifyObservers();
@@ -2024,14 +2025,17 @@ void LLPanelGroupRolesSubTab::update(LLGroupChange gc)
}
}
- if (!gdatap || !gdatap->isMemberDataComplete())
+ if(!mFirstOpen)
{
- LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mGroupID);
- }
-
- if (!gdatap || !gdatap->isRoleMemberDataComplete())
- {
- LLGroupMgr::getInstance()->sendGroupRoleMembersRequest(mGroupID);
+ if (!gdatap || !gdatap->isMemberDataComplete())
+ {
+ LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mGroupID);
+ }
+
+ if (!gdatap || !gdatap->isRoleMemberDataComplete())
+ {
+ LLGroupMgr::getInstance()->sendGroupRoleMembersRequest(mGroupID);
+ }
}
if ((GC_ROLE_MEMBER_DATA == gc || GC_MEMBER_DATA == gc)
@@ -2662,7 +2666,7 @@ void LLPanelGroupRoles::setGroupID(const LLUUID& id)
if(mSubTabContainer)
mSubTabContainer->selectTab(1);
-
+ group_roles_tab->mFirstOpen = TRUE;
activate();
}
diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h
index 0cf272f3ee..71b1db5079 100755
--- a/indra/newview/llpanelgrouproles.h
+++ b/indra/newview/llpanelgrouproles.h
@@ -259,6 +259,9 @@ public:
void saveRoleChanges(bool select_saved_role);
virtual void setGroupID(const LLUUID& id);
+
+ BOOL mFirstOpen;
+
protected:
void handleActionCheck(LLUICtrl* ctrl, bool force);
LLSD createRoleItem(const LLUUID& role_id, std::string name, std::string title, S32 members);
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index e2b4d098e9..634663ef90 100755
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -251,6 +251,7 @@ void LLPanelLogin::addFavoritesToStartLocation()
// Load favorites into the combo.
std::string user_defined_name = getChild<LLComboBox>("username_combo")->getSimple();
+ std::replace(user_defined_name.begin(), user_defined_name.end(), '.', ' ');
std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml");
LLSD fav_llsd;
llifstream file;
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index 665b9ab294..6b74d90708 100755
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -1862,14 +1862,19 @@ void LLPanelObjectInventory::refresh()
}
if(!has_inventory)
{
- mTaskUUID = LLUUID::null;
- removeVOInventoryListener();
- clearContents();
+ clearInventoryTask();
}
mInventoryViewModel.setTaskID(mTaskUUID);
//LL_INFOS() << "LLPanelObjectInventory::refresh() " << mTaskUUID << LL_ENDL;
}
+void LLPanelObjectInventory::clearInventoryTask()
+{
+ mTaskUUID = LLUUID::null;
+ removeVOInventoryListener();
+ clearContents();
+}
+
void LLPanelObjectInventory::removeSelectedItem()
{
if(mFolders)
diff --git a/indra/newview/llpanelobjectinventory.h b/indra/newview/llpanelobjectinventory.h
index 9559f7e886..3de49242ac 100755
--- a/indra/newview/llpanelobjectinventory.h
+++ b/indra/newview/llpanelobjectinventory.h
@@ -62,6 +62,7 @@ public:
void refresh();
const LLUUID& getTaskUUID() { return mTaskUUID;}
+ void clearInventoryTask();
void removeSelectedItem();
void startRenamingSelectedItem();
diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp
index 6979ae06e0..a5f59dbf4a 100755
--- a/indra/newview/llpanelpeoplemenus.cpp
+++ b/indra/newview/llpanelpeoplemenus.cpp
@@ -90,7 +90,7 @@ LLContextMenu* PeopleContextMenu::createMenu()
// Set up for multi-selected People
// registrar.add("Avatar.AddFriend", boost::bind(&LLAvatarActions::requestFriendshipDialog, mUUIDs)); // *TODO: unimplemented
- registrar.add("Avatar.IM", boost::bind(&LLAvatarActions::startConference, mUUIDs, LLUUID::null));
+ registrar.add("Avatar.IM", boost::bind(&PeopleContextMenu::startConference, this));
registrar.add("Avatar.Call", boost::bind(&LLAvatarActions::startAdhocCall, mUUIDs, LLUUID::null));
registrar.add("Avatar.OfferTeleport", boost::bind(&PeopleContextMenu::offerTeleport, this));
registrar.add("Avatar.RemoveFriend", boost::bind(&LLAvatarActions::removeFriendsDialog, mUUIDs));
@@ -272,6 +272,19 @@ void PeopleContextMenu::offerTeleport()
LLAvatarActions::offerTeleport(mUUIDs);
}
+void PeopleContextMenu::startConference()
+{
+ uuid_vec_t uuids;
+ for (uuid_vec_t::const_iterator it = mUUIDs.begin(); it != mUUIDs.end(); ++it)
+ {
+ if(*it != gAgentID)
+ {
+ uuids.push_back(*it);
+ }
+ }
+ LLAvatarActions::startConference(uuids);
+}
+
//== NearbyPeopleContextMenu ===============================================================
void NearbyPeopleContextMenu::buildContextMenu(class LLMenuGL& menu, U32 flags)
diff --git a/indra/newview/llpanelpeoplemenus.h b/indra/newview/llpanelpeoplemenus.h
index 945382ebc5..9767bab89f 100755
--- a/indra/newview/llpanelpeoplemenus.h
+++ b/indra/newview/llpanelpeoplemenus.h
@@ -47,6 +47,7 @@ private:
bool enableContextMenuItem(const LLSD& userdata);
bool checkContextMenuItem(const LLSD& userdata);
void offerTeleport();
+ void startConference();
void requestTeleport();
};
diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp
index 0817b677bc..ed91d277dd 100755
--- a/indra/newview/llpanelplaceprofile.cpp
+++ b/indra/newview/llpanelplaceprofile.cpp
@@ -488,8 +488,9 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel,
gCacheName->getGroup(parcel->getGroupID(),
boost::bind(&LLPanelPlaceInfo::onNameCache, mRegionGroupText, _2));
- gCacheName->getGroup(parcel->getGroupID(),
- boost::bind(&LLPanelPlaceInfo::onNameCache, mParcelOwner, _2));
+ std::string owner =
+ LLSLURL("group", parcel->getGroupID(), "inspect").getSLURLString();
+ mParcelOwner->setText(owner);
}
else
{
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp
index c4858e241e..337a63e627 100755
--- a/indra/newview/llpreviewnotecard.cpp
+++ b/indra/newview/llpreviewnotecard.cpp
@@ -474,12 +474,17 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem)
&onSaveComplete,
(void*)info,
FALSE);
+ return true;
}
else // !gAssetStorage
{
LL_WARNS() << "Not connected to an asset storage system." << LL_ENDL;
return false;
}
+ if(mCloseAfterSave)
+ {
+ closeFloater();
+ }
}
}
return true;
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 6770db8140..b22e77cba8 100755
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -1190,7 +1190,7 @@ void LLScriptEdCore::onBtnSaveToFile( void* userdata )
if( self->mSaveCallback )
{
LLFilePicker& file_picker = LLFilePicker::instance();
- if( file_picker.getSaveFile( LLFilePicker::FFSAVE_SCRIPT ) )
+ if( file_picker.getSaveFile( LLFilePicker::FFSAVE_SCRIPT, self->mScriptName ) )
{
std::string filename = file_picker.getFirstFile();
std::string scriptText=self->mEditor->getText();
@@ -1973,6 +1973,7 @@ void LLLiveLSLEditor::loadScriptText(LLVFS *vfs, const LLUUID &uuid, LLAssetType
mScriptEd->setScriptText(LLStringExplicit(&buffer[0]), TRUE);
mScriptEd->mEditor->makePristine();
+ mScriptEd->setScriptName(getItem()->getName());
}
diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h
index cb53d1df07..a343814221 100755
--- a/indra/newview/llpreviewscript.h
+++ b/indra/newview/llpreviewscript.h
@@ -109,6 +109,8 @@ public:
virtual bool hasAccelerators() const { return true; }
+ void setScriptName(const std::string& name){mScriptName = name;};
+
private:
void onBtnHelp();
void onBtnDynamicHelp();
@@ -131,6 +133,7 @@ protected:
private:
std::string mSampleText;
+ std::string mScriptName;
LLTextEditor* mEditor;
void (*mLoadCallback)(void* userdata);
void (*mSaveCallback)(void* userdata, BOOL close_after_save);
diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp
index 8fd0eb5931..c82894a5cc 100755
--- a/indra/newview/lltoastalertpanel.cpp
+++ b/indra/newview/lltoastalertpanel.cpp
@@ -266,6 +266,11 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal
mLineEditor->setMaxTextChars(edit_text_max_chars);
mLineEditor->setText(edit_text_contents);
+ if("SaveOutfitAs" == mNotification->getName())
+ {
+ mLineEditor->setPrevalidate(&LLTextValidate::validateASCII);
+ }
+
// decrease limit of line editor of teleport offer dialog to avoid truncation of
// location URL in invitation message, see EXT-6891
if ("OfferTeleport" == mNotification->getName())
diff --git a/indra/newview/lltoolgrab.cpp b/indra/newview/lltoolgrab.cpp
index 493c970141..9ac84e0066 100755
--- a/indra/newview/lltoolgrab.cpp
+++ b/indra/newview/lltoolgrab.cpp
@@ -83,6 +83,7 @@ LLToolGrab::LLToolGrab( LLToolComposite* composite )
mLastFace(0),
mSpinGrabbing( FALSE ),
mSpinRotation(),
+ mClickedInMouselook( FALSE ),
mHideBuildHighlight(FALSE)
{ }
@@ -136,6 +137,7 @@ BOOL LLToolGrab::handleMouseDown(S32 x, S32 y, MASK mask)
// can grab transparent objects (how touch event propagates, scripters rely on this)
gViewerWindow->pickAsync(x, y, mask, pickCallback, TRUE);
}
+ mClickedInMouselook = gAgentCamera.cameraMouselook();
return TRUE;
}
@@ -926,13 +928,21 @@ BOOL LLToolGrab::handleMouseUp(S32 x, S32 y, MASK mask)
{
setMouseCapture( FALSE );
}
+
mMode = GRAB_INACTIVE;
- // HACK: Make some grabs temporary
- if (gGrabTransientTool)
+ if(mClickedInMouselook && !gAgentCamera.cameraMouselook())
{
- gBasicToolset->selectTool( gGrabTransientTool );
- gGrabTransientTool = NULL;
+ mClickedInMouselook = FALSE;
+ }
+ else
+ {
+ // HACK: Make some grabs temporary
+ if (gGrabTransientTool)
+ {
+ gBasicToolset->selectTool( gGrabTransientTool );
+ gGrabTransientTool = NULL;
+ }
}
//gAgent.setObjectTracking(gSavedSettings.getBOOL("TrackFocusObject"));
diff --git a/indra/newview/lltoolgrab.h b/indra/newview/lltoolgrab.h
index 06a3b662c8..5107716aab 100755
--- a/indra/newview/lltoolgrab.h
+++ b/indra/newview/lltoolgrab.h
@@ -133,6 +133,8 @@ private:
LLQuaternion mSpinRotation;
BOOL mHideBuildHighlight;
+
+ BOOL mClickedInMouselook;
};
extern BOOL gGrabBtnVertical;
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index 6881ec4563..959301b546 100755
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -439,8 +439,12 @@ ECursorType LLToolPie::cursorFromObject(LLViewerObject* object)
break;
case CLICK_ACTION_BUY:
if ( mClickActionBuyEnabled )
- {
- cursor = UI_CURSOR_TOOLBUY;
+ {
+ LLSelectNode* node = LLSelectMgr::getInstance()->getHoverNode();
+ if (!node || node->mSaleInfo.isForSale())
+ {
+ cursor = UI_CURSOR_TOOLBUY;
+ }
}
break;
case CLICK_ACTION_OPEN:
@@ -544,6 +548,7 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
mHoverPick = gViewerWindow->pickImmediate(x, y, FALSE);
LLViewerObject *parent = NULL;
LLViewerObject *object = mHoverPick.getObject();
+ LLSelectMgr::getInstance()->setHoverObject(object, mHoverPick.mObjectFace);
if (object)
{
parent = object->getRootEdit();
diff --git a/indra/newview/lltoolselect.cpp b/indra/newview/lltoolselect.cpp
index 0a9153eecb..812abe9dbd 100755
--- a/indra/newview/lltoolselect.cpp
+++ b/indra/newview/lltoolselect.cpp
@@ -36,6 +36,7 @@
#include "llmanip.h"
#include "llmenugl.h"
#include "llselectmgr.h"
+#include "llviewermediafocus.h"
#include "lltoolmgr.h"
#include "llfloaterscriptdebug.h"
#include "llviewercamera.h"
@@ -110,6 +111,21 @@ LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pi
{
BOOL already_selected = object->isSelected();
+ if (already_selected &&
+ object->getNumTEs() > 0 &&
+ !LLSelectMgr::getInstance()->getSelection()->contains(object,SELECT_ALL_TES))
+ {
+ const LLTextureEntry* tep = object->getTE(pick.mObjectFace);
+ if (tep && !tep->isSelected() && !LLViewerMediaFocus::getInstance()->getFocusedObjectID().isNull())
+ {
+ // we were interacting with media and clicked on non selected face, drop media focus
+ LLViewerMediaFocus::getInstance()->clearFocus();
+ // selection was removed and zoom preserved by clearFocus(), continue with regular selection
+ already_selected = false;
+ extend_select = true;
+ }
+ }
+
if ( extend_select )
{
if ( already_selected )
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index a3befdb046..1daa85176a 100755
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -8232,9 +8232,9 @@ class LLWorldEnableEnvSettings : public view_listener_t
bool result = false;
std::string tod = userdata.asString();
- if (tod == "region")
+ if (LLEnvManagerNew::instance().getUseRegionSettings())
{
- return LLEnvManagerNew::instance().getUseRegionSettings();
+ return (tod == "region");
}
if (LLEnvManagerNew::instance().getUseFixedSky())
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 1dabe07942..e56d74c39a 100755
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -2788,8 +2788,8 @@ void LLViewerObject::dirtyInventory()
mInventory->clear(); // will deref and delete entries
delete mInventory;
mInventory = NULL;
- mInventoryDirty = TRUE;
}
+ mInventoryDirty = TRUE;
}
void LLViewerObject::registerInventoryListener(LLVOInventoryListener* listener, void* user_data)
@@ -2826,12 +2826,15 @@ void LLViewerObject::clearInventoryListeners()
void LLViewerObject::requestInventory()
{
- mInventoryDirty = FALSE;
+ if(mInventoryDirty && mInventory && !mInventoryCallbacks.empty())
+ {
+ mInventory->clear(); // will deref and delete entries
+ delete mInventory;
+ mInventory = NULL;
+ mInventoryDirty = FALSE; //since we are going to request it now
+ }
if(mInventory)
{
- //mInventory->clear() // will deref and delete it
- //delete mInventory;
- //mInventory = NULL;
doInventoryCallback();
}
// throw away duplicate requests
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index cdb08f4707..0e5cffb1e5 100755
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -117,6 +117,7 @@ LLViewerParcelMgr::LLViewerParcelMgr()
mHoverRequestResult(0),
mHoverWestSouth(),
mHoverEastNorth(),
+ mTeleportInProgressPosition(),
mRenderCollision(FALSE),
mRenderSelection(TRUE),
mCollisionBanned(0),
@@ -1585,7 +1586,15 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
if (instance->mTeleportInProgress)
{
instance->mTeleportInProgress = FALSE;
- instance->mTeleportFinishedSignal(gAgent.getPositionGlobal(), false);
+ if(instance->mTeleportInProgressPosition.isNull())
+ {
+ //initial update
+ instance->mTeleportFinishedSignal(gAgent.getPositionGlobal(), false);
+ }
+ else
+ {
+ instance->mTeleportFinishedSignal(instance->mTeleportInProgressPosition, false);
+ }
}
}
}
@@ -2494,6 +2503,7 @@ void LLViewerParcelMgr::onTeleportFinished(bool local, const LLVector3d& new_pos
// Non-local teleport (inter-region or between different parcels of the same region).
// The agent parcel data has not been updated yet.
// Let's wait for the update and then emit the signal.
+ mTeleportInProgressPosition = new_pos;
mTeleportInProgress = TRUE;
}
}
diff --git a/indra/newview/llviewerparcelmgr.h b/indra/newview/llviewerparcelmgr.h
index 58d398e141..b5b269abdf 100755
--- a/indra/newview/llviewerparcelmgr.h
+++ b/indra/newview/llviewerparcelmgr.h
@@ -335,6 +335,7 @@ private:
std::vector<LLParcelObserver*> mObservers;
BOOL mTeleportInProgress;
+ LLVector3d mTeleportInProgressPosition;
teleport_finished_signal_t mTeleportFinishedSignal;
teleport_failed_signal_t mTeleportFailedSignal;
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 04f64a4997..b77e1d2c44 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -2065,7 +2065,7 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time)
}
if (!(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_AVATAR))
- && !(gSavedSettings.getBOOL("DisableAllRenderTypes")))
+ && !(gSavedSettings.getBOOL("DisableAllRenderTypes")) && !isSelf())
{
return;
}
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index a770352f86..7cb53a0706 100755
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -1694,6 +1694,8 @@ BOOL LLWorldMapView::handleHover( S32 x, S32 y, MASK mask )
sPanY += delta_y;
sTargetPanX = sPanX;
sTargetPanY = sPanY;
+
+ gViewerWindow->moveCursorToCenter();
}
// doesn't matter, cursor should be hidden
diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml
index dad81aca4f..c64ee5565a 100755
--- a/indra/newview/skins/default/xui/en/floater_im_session.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_session.xml
@@ -209,7 +209,7 @@
default_tab_group="3"
tab_group="2"
name="right_part_holder"
- min_width="230">
+ min_width="207">
<layout_stack
animate="true"
follows="all"
diff --git a/indra/newview/skins/default/xui/en/floater_snapshot.xml b/indra/newview/skins/default/xui/en/floater_snapshot.xml
index 853c209bca..c0089a30d8 100755
--- a/indra/newview/skins/default/xui/en/floater_snapshot.xml
+++ b/indra/newview/skins/default/xui/en/floater_snapshot.xml
@@ -7,6 +7,7 @@
height="500"
layout="topleft"
name="Snapshot"
+ single_instance="true"
help_topic="snapshot"
save_rect="true"
save_visibility="false"
diff --git a/indra/newview/skins/default/xui/en/menu_conversation.xml b/indra/newview/skins/default/xui/en/menu_conversation.xml
index 31b1d091ee..f5a493c064 100755
--- a/indra/newview/skins/default/xui/en/menu_conversation.xml
+++ b/indra/newview/skins/default/xui/en/menu_conversation.xml
@@ -17,6 +17,7 @@
layout="topleft"
name="open_voice_conversation">
<on_click function="Avatar.DoToSelected" parameter="open_voice_conversation"/>
+ <on_enable function="Avatar.EnableItem" parameter="can_open_voice_conversation"/>
</menu_item_call>
<menu_item_call
label="Disconnect from voice"
diff --git a/indra/newview/skins/default/xui/en/mime_types.xml b/indra/newview/skins/default/xui/en/mime_types.xml
index a585069faa..f5f2223330 100755
--- a/indra/newview/skins/default/xui/en/mime_types.xml
+++ b/indra/newview/skins/default/xui/en/mime_types.xml
@@ -101,6 +101,27 @@
true
</allow_looping>
</widgetset>
+ <widgetset name="none">
+ <label name="none_label">
+ No Content
+ </label>
+ <default_type>
+ none/none
+ </default_type>
+ <icon>
+ icn_media_web.tga
+ </icon>
+ <tooltip name="none_tooltip">
+ No media here
+ </tooltip>
+ <playtip name="none_playtip" />
+ <allow_resize>
+ false
+ </allow_resize>
+ <allow_looping>
+ false
+ </allow_looping>
+ </widgetset>
<scheme name="rtsp">
<label name="rtsp_label">
Real Time Streaming
diff --git a/indra/newview/skins/default/xui/en/mime_types_linux.xml b/indra/newview/skins/default/xui/en/mime_types_linux.xml
index e95b371d00..84aeaf3b54 100755
--- a/indra/newview/skins/default/xui/en/mime_types_linux.xml
+++ b/indra/newview/skins/default/xui/en/mime_types_linux.xml
@@ -101,6 +101,27 @@
true
</allow_looping>
</widgetset>
+ <widgetset name="none">
+ <label name="none_label">
+ No Content
+ </label>
+ <default_type>
+ none/none
+ </default_type>
+ <icon>
+ icn_media_web.tga
+ </icon>
+ <tooltip name="none_tooltip">
+ No media here
+ </tooltip>
+ <playtip name="none_playtip" />
+ <allow_resize>
+ false
+ </allow_resize>
+ <allow_looping>
+ false
+ </allow_looping>
+ </widgetset>
<scheme name="rtsp">
<label name="rtsp_label">
Real Time Streaming
diff --git a/indra/newview/skins/default/xui/en/mime_types_mac.xml b/indra/newview/skins/default/xui/en/mime_types_mac.xml
index 7931e55c0a..90230f12dd 100755
--- a/indra/newview/skins/default/xui/en/mime_types_mac.xml
+++ b/indra/newview/skins/default/xui/en/mime_types_mac.xml
@@ -101,6 +101,27 @@
true
</allow_looping>
</widgetset>
+ <widgetset name="none">
+ <label name="none_label">
+ No Content
+ </label>
+ <default_type>
+ none/none
+ </default_type>
+ <icon>
+ icn_media_web.tga
+ </icon>
+ <tooltip name="none_tooltip">
+ No media here
+ </tooltip>
+ <playtip name="none_playtip" />
+ <allow_resize>
+ false
+ </allow_resize>
+ <allow_looping>
+ false
+ </allow_looping>
+ </widgetset>
<scheme name="rtsp">
<label name="rtsp_label">
Real Time Streaming
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 7297ba4fc0..e1194b2025 100755
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -7836,7 +7836,16 @@ You uploaded a [RESOLUTION] baked texture for '[BODYREGION]' after [TIME] second
( [EXISTENCE] seconds alive )
You locally updated a [RESOLUTION] baked texture for '[BODYREGION]' after [TIME] seconds.
</notification>
-
+
+ <notification
+ icon="alertmodal.tga"
+ name="CannotUploadTexture"
+ type="alertmodal">
+Unable to upload texture.
+[REASON]
+ <tag>fail</tag>
+ </notification>
+
<notification
icon="alertmodal.tga"
name="LivePreviewUnavailable"