diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/app_settings/settings.xml | 11 | ||||
-rw-r--r-- | indra/newview/llfloatermap.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llfloatermap.h | 2 | ||||
-rw-r--r-- | indra/newview/llnavigationbar.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llpanellandmarks.cpp | 18 | ||||
-rw-r--r-- | indra/newview/llpanellandmarks.h | 1 | ||||
-rw-r--r-- | indra/newview/llteleporthistory.cpp | 22 | ||||
-rw-r--r-- | indra/newview/llteleporthistory.h | 4 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_map.xml | 2 |
9 files changed, 61 insertions, 13 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 532ce69e41..e86f50ce20 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -11362,5 +11362,16 @@ <string>mini_map</string> </array> </map> + <key>LandmarksSortedByDate</key> + <map> + <key>Comment</key> + <string>Reflects landmarks panel sorting order.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> </map> </llsd> diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp index 725fc17136..c259659083 100644 --- a/indra/newview/llfloatermap.cpp +++ b/indra/newview/llfloatermap.cpp @@ -106,6 +106,8 @@ BOOL LLFloaterMap::postBuild() mPopupMenu->setItemEnabled ("Stop Tracking", false); } + stretchMiniMap(getRect().getWidth(),getRect().getHeight()); + updateMinorDirections(); // Get the drag handle all the way in back @@ -229,10 +231,8 @@ void LLFloaterMap::onFocusLost() LLPanel::onFocusLost(); } -void LLFloaterMap::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLFloaterMap::stretchMiniMap(S32 width,S32 height) { - LLFloater::reshape(width, height, called_from_parent); - //fix for ext-7112 //by default ctrl can't overlap caption area if(mMap) @@ -242,6 +242,13 @@ void LLFloaterMap::reshape(S32 width, S32 height, BOOL called_from_parent) mMap->reshape( width, height, 1); mMap->setRect(map_rect); } +} + +void LLFloaterMap::reshape(S32 width, S32 height, BOOL called_from_parent) +{ + LLFloater::reshape(width, height, called_from_parent); + + stretchMiniMap(width, height); updateMinorDirections(); } diff --git a/indra/newview/llfloatermap.h b/indra/newview/llfloatermap.h index 9ff2f03180..3c063adfb8 100644 --- a/indra/newview/llfloatermap.h +++ b/indra/newview/llfloatermap.h @@ -61,6 +61,8 @@ private: void handleStopTracking (const LLSD& userdata); void setDirectionPos( LLTextBox* text_box, F32 rotation ); void updateMinorDirections(); + + void stretchMiniMap(S32 width,S32 height); LLMenuGL* mPopupMenu; diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index 251c60b5bf..e5548007bd 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -713,6 +713,7 @@ void LLNavigationBar::onNavigationButtonHeldUp(LLButton* nav_button) void LLNavigationBar::handleLoginComplete() { + LLTeleportHistory::getInstance()->handleLoginComplete(); mCmbLocation->handleLoginComplete(); } diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 4bf4f9eac1..7fb46fc84f 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -221,8 +221,6 @@ BOOL LLLandmarksPanel::postBuild() // mast be called before any other initXXX methods to init Gear menu initListCommandsHandlers(); - U32 sort_order = gSavedSettings.getU32(LLInventoryPanel::DEFAULT_SORT_ORDER); - mSortByDate = sort_order & LLInventoryFilter::SO_DATE; initFavoritesInventoryPanel(); initLandmarksInventoryPanel(); initMyInventoryPanel(); @@ -607,7 +605,8 @@ void LLLandmarksPanel::initLandmarksPanel(LLPlacesInventoryPanel* inventory_list inventory_list->setSelectCallback(boost::bind(&LLLandmarksPanel::onSelectionChange, this, inventory_list, _1, _2)); inventory_list->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); - updateSortOrder(inventory_list, mSortByDate); + bool sorting_order = gSavedSettings.getBOOL("LandmarksSortedByDate"); + updateSortOrder(inventory_list, sorting_order); LLPlacesFolderView* root_folder = dynamic_cast<LLPlacesFolderView*>(inventory_list->getRootFolder()); if (root_folder) @@ -875,10 +874,12 @@ void LLLandmarksPanel::onFoldingAction(const LLSD& userdata) } else if ("sort_by_date" == command_name) { - mSortByDate = !mSortByDate; - updateSortOrder(mLandmarksInventoryPanel, mSortByDate); - updateSortOrder(mMyInventoryPanel, mSortByDate); - updateSortOrder(mLibraryInventoryPanel, mSortByDate); + bool sorting_order = gSavedSettings.getBOOL("LandmarksSortedByDate"); + sorting_order=!sorting_order; + gSavedSettings.setBOOL("LandmarksSortedByDate",sorting_order); + updateSortOrder(mLandmarksInventoryPanel, sorting_order); + updateSortOrder(mMyInventoryPanel, sorting_order); + updateSortOrder(mLibraryInventoryPanel, sorting_order); } else { @@ -895,7 +896,8 @@ bool LLLandmarksPanel::isActionChecked(const LLSD& userdata) const if ( "sort_by_date" == command_name) { - return mSortByDate; + bool sorting_order = gSavedSettings.getBOOL("LandmarksSortedByDate"); + return sorting_order; } return false; diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h index 8f8d9c2708..0e70c72f11 100644 --- a/indra/newview/llpanellandmarks.h +++ b/indra/newview/llpanellandmarks.h @@ -167,7 +167,6 @@ private: LLInventoryObserver* mInventoryObserver; LLPanel* mListCommands; - bool mSortByDate; typedef std::vector<LLAccordionCtrlTab*> accordion_tabs_t; accordion_tabs_t mAccordionTabs; diff --git a/indra/newview/llteleporthistory.cpp b/indra/newview/llteleporthistory.cpp index 15684337f4..cac3b58464 100644 --- a/indra/newview/llteleporthistory.cpp +++ b/indra/newview/llteleporthistory.cpp @@ -38,6 +38,7 @@ #include "llsdserialize.h" #include "llagent.h" +#include "llvoavatarself.h" #include "llslurl.h" #include "llviewercontrol.h" // for gSavedSettings #include "llviewerparcelmgr.h" @@ -108,6 +109,16 @@ void LLTeleportHistory::onTeleportFailed() } } +void LLTeleportHistory::handleLoginComplete() +{ + if( mGotInitialUpdate ) + { + return; + } + updateCurrentLocation(gAgent.getPositionGlobal()); +} + + void LLTeleportHistory::updateCurrentLocation(const LLVector3d& new_pos) { if (mRequestedItem != -1) // teleport within the history in progress? @@ -117,6 +128,17 @@ void LLTeleportHistory::updateCurrentLocation(const LLVector3d& new_pos) } else { + //EXT-7034 + //skip initial update if agent avatar is no valid yet + //this may happen when updateCurrentLocation called while login process + //sometimes isAgentAvatarValid return false and in this case new_pos + //(which actually is gAgent.getPositionGlobal() ) is invalid + //if this position will be saved then teleport back will teleport user to wrong position + if ( !mGotInitialUpdate && !isAgentAvatarValid() ) + { + return ; + } + // If we're getting the initial location update // while we already have a (loaded) non-empty history, // there's no need to purge forward items or add a new item. diff --git a/indra/newview/llteleporthistory.h b/indra/newview/llteleporthistory.h index a82bec7c4f..e035451e71 100644 --- a/indra/newview/llteleporthistory.h +++ b/indra/newview/llteleporthistory.h @@ -136,6 +136,10 @@ public: * @see load() */ void dump() const; + /** + * Process login complete event. Basically put current location into history + */ + void handleLoginComplete(); private: diff --git a/indra/newview/skins/default/xui/en/floater_map.xml b/indra/newview/skins/default/xui/en/floater_map.xml index 249b091800..a0e28f7a42 100644 --- a/indra/newview/skins/default/xui/en/floater_map.xml +++ b/indra/newview/skins/default/xui/en/floater_map.xml @@ -5,7 +5,7 @@ can_minimize="true" can_resize="true" follows="top|right" - height="218" + height="174" layout="topleft" min_height="174" min_width="174" |