diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/app_settings/settings.xml | 4 | ||||
-rw-r--r-- | indra/newview/llappviewer.cpp | 27 | ||||
-rw-r--r-- | indra/newview/llflexibleobject.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llfloaterpathfindingconsole.h | 4 | ||||
-rwxr-xr-x | indra/newview/llfloaterpreference.cpp | 19 | ||||
-rw-r--r-- | indra/newview/llfolderview.cpp | 34 | ||||
-rw-r--r-- | indra/newview/llfolderview.h | 2 | ||||
-rw-r--r-- | indra/newview/llfolderviewitem.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llfolderviewitem.h | 1 | ||||
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llpanellogin.cpp | 50 | ||||
-rw-r--r-- | indra/newview/llstartup.cpp | 35 | ||||
-rw-r--r-- | indra/newview/llstartup.h | 2 | ||||
-rw-r--r-- | indra/newview/llviewerobject.cpp | 20 | ||||
-rw-r--r-- | indra/newview/llviewerobject.h | 1 | ||||
-rw-r--r-- | indra/newview/llviewerparcelmgr.cpp | 3 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 2 | ||||
-rw-r--r-- | indra/newview/tests/lllogininstance_test.cpp | 1 |
18 files changed, 163 insertions, 57 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 2af71d98b8..1bf773bb9e 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -5023,7 +5023,7 @@ <key>LoginLocation</key> <map> <key>Comment</key> - <string>Login location ('last', 'home')</string> + <string>Default Login location ('last', 'home') preference</string> <key>Persist</key> <integer>1</integer> <key>Type</key> @@ -6123,7 +6123,7 @@ <key>NextLoginLocation</key> <map> <key>Comment</key> - <string>Location to log into by default.</string> + <string>Location to log into for this session - set from command line or the login panel, cleared following a successfull login.</string> <key>Persist</key> <integer>1</integer> <key>Type</key> diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 63737c78d0..cb69048c60 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2665,14 +2665,6 @@ bool LLAppViewer::initConfiguration() } } - // If automatic login from command line with --login switch - // init StartSLURL location. In interactive login, LLPanelLogin - // will take care of it. - if ((clp.hasOption("login") || clp.hasOption("autologin")) && !clp.hasOption("url") && !clp.hasOption("slurl")) - { - LLStartUp::setStartSLURL(LLSLURL(gSavedSettings.getString("LoginLocation"))); - } - if (!gSavedSettings.getBOOL("AllowMultipleViewers")) { // @@ -2720,12 +2712,27 @@ bool LLAppViewer::initConfiguration() } } - // need to do this here - need to have initialized global settings first + // NextLoginLocation is set from the command line option std::string nextLoginLocation = gSavedSettings.getString( "NextLoginLocation" ); if ( !nextLoginLocation.empty() ) { + LL_DEBUGS("AppInit")<<"set start from NextLoginLocation: "<<nextLoginLocation<<LL_ENDL; LLStartUp::setStartSLURL(LLSLURL(nextLoginLocation)); - }; + } + else if ( ( clp.hasOption("login") || clp.hasOption("autologin")) + && !clp.hasOption("url") + && !clp.hasOption("slurl")) + { + // If automatic login from command line with --login switch + // init StartSLURL location. + std::string start_slurl_setting = gSavedSettings.getString("LoginLocation"); + LL_DEBUGS("AppInit") << "start slurl setting '" << start_slurl_setting << "'" << LL_ENDL; + LLStartUp::setStartSLURL(LLSLURL(start_slurl_setting)); + } + else + { + // the login location will be set by the login panel (see LLPanelLogin) + } gLastRunVersion = gSavedSettings.getString("LastRunVersion"); diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp index c4dca4cb79..9745bb6d64 100644 --- a/indra/newview/llflexibleobject.cpp +++ b/indra/newview/llflexibleobject.cpp @@ -368,10 +368,11 @@ void LLVolumeImplFlexible::doFlexibleUpdate() LLPath *path = &volume->getPath(); if ((mSimulateRes == 0 || !mInitialized) && mVO->mDrawable->isVisible()) { - //mVO->markForUpdate(TRUE); + BOOL force_update = mSimulateRes == 0 ? TRUE : FALSE; + doIdleUpdate(gAgent, *LLWorld::getInstance(), 0.0); - if (mSimulateRes == 0) + if (!force_update || !gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_FLEXIBLE)) { return; // we did not get updated or initialized, proceeding without can be dangerous } diff --git a/indra/newview/llfloaterpathfindingconsole.h b/indra/newview/llfloaterpathfindingconsole.h index 4b2f7672e4..e999e57741 100644 --- a/indra/newview/llfloaterpathfindingconsole.h +++ b/indra/newview/llfloaterpathfindingconsole.h @@ -93,7 +93,7 @@ public: LLPathingLib::LLPLCharacterType getRenderHeatmapType() const; void setRenderHeatmapType(LLPathingLib::LLPLCharacterType pRenderHeatmapType); - + void onRegionBoundaryCross(); protected: private: @@ -124,7 +124,7 @@ private: void onClearPathClicked(); void handleNavMeshZoneStatus(LLPathfindingNavMeshZone::ENavMeshZoneRequestStatus pNavMeshZoneRequestStatus); - void onRegionBoundaryCross(); + void onPathEvent(); void setDefaultInputs(); diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 60556147a9..5752f839ce 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -77,7 +77,7 @@ #include "llviewerthrottle.h" #include "llvotree.h" #include "llvosky.h" - +#include "llfloaterpathfindingconsole.h" // linden library includes #include "llavatarnamecache.h" #include "llerror.h" @@ -632,6 +632,13 @@ void LLFloaterPreference::cancel() { advanced_proxy_settings->cancel(); } + //Need to reload the navmesh if the pathing console is up + LLHandle<LLFloaterPathfindingConsole> pathfindingConsoleHandle = LLFloaterPathfindingConsole::getInstanceHandle(); + if ( !pathfindingConsoleHandle.isDead() ) + { + LLFloaterPathfindingConsole* pPathfindingConsole = pathfindingConsoleHandle.get(); + pPathfindingConsole->onRegionBoundaryCross(); + } } void LLFloaterPreference::onOpen(const LLSD& key) @@ -779,7 +786,15 @@ void LLFloaterPreference::onBtnOK() llinfos << "Can't close preferences!" << llendl; } - LLPanelLogin::updateLocationSelectorsVisibility(); + LLPanelLogin::updateLocationSelectorsVisibility(); + //Need to reload the navmesh if the pathing console is up + LLHandle<LLFloaterPathfindingConsole> pathfindingConsoleHandle = LLFloaterPathfindingConsole::getInstanceHandle(); + if ( !pathfindingConsoleHandle.isDead() ) + { + LLFloaterPathfindingConsole* pPathfindingConsole = pathfindingConsoleHandle.get(); + pPathfindingConsole->onRegionBoundaryCross(); + } + } // static diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 7d047ec67e..d4080ab3f7 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -2235,14 +2235,9 @@ void LLFolderView::doIdle() arrangeAll(); } - mNeedsAutoSelect = mFilter->hasFilterString() && - !(gFocusMgr.childHasKeyboardFocus(this) || gFocusMgr.getMouseCapture()); - - - if (mFilter->isModified() && mFilter->isNotDefault()) - { - mNeedsAutoSelect = TRUE; - } + BOOL filter_modified_and_active = mFilter->isModified() && mFilter->isNotDefault(); + mNeedsAutoSelect = filter_modified_and_active && + !(gFocusMgr.childHasKeyboardFocus(this) || gFocusMgr.getMouseCapture()); mFilter->clearModified(); // filter to determine visibility before arranging @@ -2254,7 +2249,7 @@ void LLFolderView::doIdle() LLFastTimer t3(FTM_AUTO_SELECT); // select new item only if a filtered item not currently selected LLFolderViewItem* selected_itemp = mSelectedItems.empty() ? NULL : mSelectedItems.back(); - if (!mAutoSelectOverride && (!selected_itemp || !selected_itemp->potentiallyFiltered())) + if (!mAutoSelectOverride && (!selected_itemp || !selected_itemp->potentiallyVisible())) { // these are named variables to get around gcc not binding non-const references to rvalues // and functor application is inherently non-const to allow for stateful functors @@ -2264,7 +2259,7 @@ void LLFolderView::doIdle() // Open filtered folders for folder views with mAutoSelectOverride=TRUE. // Used by LLPlacesFolderView. - if (mAutoSelectOverride && !mFilter->getFilterSubString().empty()) + if (!mFilter->getFilterSubString().empty()) { // these are named variables to get around gcc not binding non-const references to rvalues // and functor application is inherently non-const to allow for stateful functors @@ -2556,6 +2551,25 @@ void LLFolderView::onRenamerLost() } } +LLFolderViewItem* LLFolderView::getNextUnselectedItem() +{ + LLFolderViewItem* last_item = *mSelectedItems.rbegin(); + LLFolderViewItem* new_selection = last_item->getNextOpenNode(FALSE); + while(new_selection && new_selection->isSelected()) + { + new_selection = new_selection->getNextOpenNode(FALSE); + } + if (!new_selection) + { + new_selection = last_item->getPreviousOpenNode(FALSE); + while (new_selection && (new_selection->isInSelection())) + { + new_selection = new_selection->getPreviousOpenNode(FALSE); + } + } + return new_selection; +} + LLInventoryFilter* LLFolderView::getFilter() { return mFilter; diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h index da8bb15f8e..3f78312a98 100644 --- a/indra/newview/llfolderview.h +++ b/indra/newview/llfolderview.h @@ -207,6 +207,8 @@ public: virtual void doDelete(); virtual BOOL canDoDelete() const; + LLFolderViewItem* getNextUnselectedItem(); + // Public rename functionality - can only start the process void startRenamingSelectedItem( void ); diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 515e544452..3aa16b4413 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -1098,6 +1098,10 @@ void LLFolderViewItem::draw() } } +bool LLFolderViewItem::isInSelection() const +{ + return mIsSelected || (mParentFolder && mParentFolder->isInSelection()); +} ///---------------------------------------------------------------------------- /// Class LLFolderViewFolder diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h index 3c7592046a..577b6b54a2 100644 --- a/indra/newview/llfolderviewitem.h +++ b/indra/newview/llfolderviewitem.h @@ -243,6 +243,7 @@ public: virtual void destroyView(); BOOL isSelected() const { return mIsSelected; } + bool isInSelection() const; void setUnselected() { mIsSelected = FALSE; } diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index b86c453d61..b819100b9b 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1355,7 +1355,10 @@ void LLItemBridge::performAction(LLInventoryModel* model, std::string action) else if ("cut" == action) { cutToClipboard(); + // MAINT-1197: This is temp code to work around a deselection/reselection bug. Please discard when merging CHUI. + LLFolderViewItem* item_to_select = mRoot->getNextUnselectedItem(); LLFolderView::removeCutItems(); + mRoot->setSelection(item_to_select, item_to_select ? item_to_select->isOpen() : false, false); return; } else if ("copy" == action) @@ -2743,7 +2746,10 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action) else if ("cut" == action) { cutToClipboard(); + // MAINT-1197: This is temp code to work around a deselection/reselection bug. Please discard when merging CHUI. + LLFolderViewItem* item_to_select = mRoot->getNextUnselectedItem(); LLFolderView::removeCutItems(); + mRoot->setSelection(item_to_select, item_to_select ? item_to_select->isOpen() : false, false); return; } else if ("copy" == action) diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index a8049b1b03..44ff62e290 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -145,12 +145,6 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, // change z sort of clickable text to be behind buttons sendChildToBack(getChildView("forgot_password_text")); - - if(LLStartUp::getStartSLURL().getType() != LLSLURL::LOCATION) - { - LLSLURL slurl(gSavedSettings.getString("LoginLocation")); - LLStartUp::setStartSLURL(slurl); - } LLComboBox* location_combo = getChild<LLComboBox>("start_location_combo"); updateLocationSelectorsVisibility(); // separate so that it can be called from preferences @@ -182,6 +176,29 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, ADD_TOP); server_choice_combo->selectFirstItem(); + LLSLURL start_slurl(LLStartUp::getStartSLURL()); + if ( !start_slurl.isSpatial() ) // has a start been established by the command line or NextLoginLocation ? + { + // no, so get the preference setting + std::string defaultStartLocation = gSavedSettings.getString("LoginLocation"); + LL_INFOS("AppInit")<<"default LoginLocation '"<<defaultStartLocation<<"'"<<LL_ENDL; + LLSLURL defaultStart(defaultStartLocation); + if ( defaultStart.isSpatial() ) + { + LLStartUp::setStartSLURL(defaultStart); + } + else + { + LL_INFOS("AppInit")<<"no valid LoginLocation, using home"<<LL_ENDL; + LLSLURL homeStart(LLSLURL::SIM_LOCATION_HOME); + LLStartUp::setStartSLURL(homeStart); + } + } + else + { + LLPanelLogin::onUpdateStartSLURL(start_slurl); // updates grid if needed + } + childSetAction("connect_btn", onClickConnect, this); getChild<LLPanel>("login")->setDefaultBtn("connect_btn"); @@ -645,8 +662,11 @@ void LLPanelLogin::onUpdateStartSLURL(const LLSLURL& new_start_slurl) * specify a particular grid; in those cases we want to change the grid * and the grid selector to match the new value. */ - if ( LLSLURL::LOCATION == new_start_slurl.getType() ) + enum LLSLURL::SLURL_TYPE new_slurl_type = new_start_slurl.getType(); + switch ( new_slurl_type ) { + case LLSLURL::LOCATION: + { std::string slurl_grid = LLGridManager::getInstance()->getGrid(new_start_slurl.getGrid()); if ( ! slurl_grid.empty() ) // is that a valid grid? { @@ -668,8 +688,24 @@ void LLPanelLogin::onUpdateStartSLURL(const LLSLURL& new_start_slurl) { // the grid specified by the slurl is not known LLNotificationsUtil::add("InvalidLocationSLURL"); + LL_WARNS("AppInit")<<"invalid LoginLocation:"<<new_start_slurl.asString()<<LL_ENDL; location_combo->setTextEntry(LLStringUtil::null); } + } + break; + + case LLSLURL::HOME_LOCATION: + location_combo->setCurrentByIndex(1); // home location + break; + + case LLSLURL::LAST_LOCATION: + location_combo->setCurrentByIndex(0); // last location + break; + + default: + LL_WARNS("AppInit")<<"invalid login slurl, using home"<<LL_ENDL; + location_combo->setCurrentByIndex(1); // home location + break; } } diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index a28d8d3546..218c35029e 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2823,22 +2823,33 @@ bool LLStartUp::dispatchURL() void LLStartUp::setStartSLURL(const LLSLURL& slurl) { - sStartSLURL = slurl; - LL_DEBUGS("AppInit")<<slurl.asString()<<LL_ENDL; + LL_DEBUGS("AppInit")<<slurl.asString()<<LL_ENDL; - switch(slurl.getType()) - { - case LLSLURL::HOME_LOCATION: - case LLSLURL::LAST_LOCATION: - case LLSLURL::LOCATION: - gSavedSettings.setString("LoginLocation", LLSLURL::SIM_LOCATION_HOME); + if ( slurl.isSpatial() ) + { + std::string new_start = slurl.getSLURLString(); + LL_DEBUGS("AppInit")<<new_start<<LL_ENDL; + sStartSLURL = slurl; LLPanelLogin::onUpdateStartSLURL(slurl); // updates grid if needed - break; - default: - break; - } + + // remember that this is where we wanted to log in...if the login fails, + // the next attempt will default to the same place. + gSavedSettings.setString("NextLoginLocation", new_start); + // following a successful login, this is cleared + // and the default reverts to LoginLocation + } + else + { + LL_WARNS("AppInit")<<"Invalid start SLURL (ignored): "<<slurl.asString()<<LL_ENDL; + } } +// static +LLSLURL& LLStartUp::getStartSLURL() +{ + return sStartSLURL; +} + /** * Read all proxy configuration settings and set up both the HTTP proxy and * SOCKS proxy as needed. diff --git a/indra/newview/llstartup.h b/indra/newview/llstartup.h index 3754aaf966..760e38890b 100644 --- a/indra/newview/llstartup.h +++ b/indra/newview/llstartup.h @@ -111,7 +111,7 @@ public: static void postStartupState(); static void setStartSLURL(const LLSLURL& slurl); - static LLSLURL& getStartSLURL() { return sStartSLURL; } + static LLSLURL& getStartSLURL(); static bool startLLProxy(); // Initialize the SOCKS 5 proxy diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 31e4fd1ed5..fc8192f14b 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -236,6 +236,7 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe mNumFaces(0), mTimeDilation(1.f), mRotTime(0.f), + mAngularVelocityRot(), mJointInfo(NULL), mState(0), mMedia(NULL), @@ -266,6 +267,7 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe { mPositionAgent = mRegionp->getOriginAgent(); } + resetRot(); LLViewerObject::sNumObjects++; } @@ -2071,14 +2073,14 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, if (new_rot != getRotation() || new_angv != old_angv) { - if (new_rot != getRotation()) + if (new_angv != old_angv) { - setRotation(new_rot); + resetRot(); } - + + // Set the rotation of the object followed by adjusting for the accumulated angular velocity (llSetTargetOmega) + setRotation(new_rot * mAngularVelocityRot); setChanged(ROTATED | SILHOUETTE); - - resetRot(); } @@ -5533,8 +5535,13 @@ void LLViewerObject::applyAngularVelocity(F32 dt) ang_vel *= 1.f/omega; + // calculate the delta increment based on the object's angular velocity dQ.setQuat(angle, ang_vel); + + // accumulate the angular velocity rotations to re-apply in the case of an object update + mAngularVelocityRot *= dQ; + // Just apply the delta increment to the current rotation setRotation(getRotation()*dQ); setChanged(MOVED | SILHOUETTE); } @@ -5543,6 +5550,9 @@ void LLViewerObject::applyAngularVelocity(F32 dt) void LLViewerObject::resetRot() { mRotTime = 0.0f; + + // Reset the accumulated angular velocity rotation + mAngularVelocityRot.loadIdentity(); } U32 LLViewerObject::getPartitionType() const diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index f8f6327750..530d6531f3 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -735,6 +735,7 @@ protected: F32 mTimeDilation; // Time dilation sent with the object. F32 mRotTime; // Amount (in seconds) that object has rotated according to angular velocity (llSetTargetOmega) + LLQuaternion mAngularVelocityRot; // accumulated rotation from the angular velocity computations LLVOJointInfo* mJointInfo; U8 mState; // legacy diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index ae9c31bfe7..2bb2e92279 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -545,9 +545,6 @@ LLParcelSelectionHandle LLViewerParcelMgr::selectLand(const LLVector3d &corner1, mRequestResult = PARCEL_RESULT_NO_DATA; - // clear the list of segments to prevent flashing - resetSegments(mHighlightSegments); - mFloatingParcelSelection->setParcel(mCurrentParcel); mCurrentParcelSelection->setParcel(NULL); mCurrentParcelSelection = new LLParcelSelection(mCurrentParcel); diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 13f073a1c2..dfd8a82c96 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -2894,7 +2894,7 @@ You have been moved into a nearby region. name="AvatarMovedLast" type="alertmodal"> <tag>fail</tag> -Your last location is not currently available. +Your requested location is not currently available. You have been moved into a nearby region. </notification> diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp index b7e81c4199..7705b4c567 100644 --- a/indra/newview/tests/lllogininstance_test.cpp +++ b/indra/newview/tests/lllogininstance_test.cpp @@ -60,6 +60,7 @@ static LLEventStream gTestPump("test_pump"); #include "../llslurl.h" #include "../llstartup.h" LLSLURL LLStartUp::sStartSLURL; +LLSLURL& LLStartUp::getStartSLURL() { return sStartSLURL; } #include "lllogin.h" |