diff options
author | Andrew Dyukov <adyukov@productengine.com> | 2010-09-06 22:56:14 +0300 |
---|---|---|
committer | Andrew Dyukov <adyukov@productengine.com> | 2010-09-06 22:56:14 +0300 |
commit | a30bc718bbeb660e92eb3f70c1ec0364903069a8 (patch) | |
tree | 11c0951ac6a4fc0adb1e6bd41f3f78e1d3635d8f /indra/llui/lllayoutstack.cpp | |
parent | e04dabd2b3309b595bbc1afa0dfa7d4081439eba (diff) |
VWR-22690 FIXED Implemented save/load of bottomtray button order.
- Added methods responsible for saving and loading order of buttons to bottomtray. Order is saved after each drag'n'drop to
ensure user's customization of bottomtray is not lost because of crash.
- Added additional argument to layoutstack movePanel() method which tells it to move panel to the beginning of mPanels vector
without requiring a pointer to panel before which it should be inserted.
Reviewed by Vadim Savchuk.
Diffstat (limited to 'indra/llui/lllayoutstack.cpp')
-rw-r--r-- | indra/llui/lllayoutstack.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index ab25d1d62b..0ff7557ead 100644 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -368,10 +368,10 @@ S32 LLLayoutStack::getDefaultWidth(S32 cur_width) return cur_width; } -void LLLayoutStack::movePanel(LLPanel* panel_to_move, LLPanel* target_panel) +void LLLayoutStack::movePanel(LLPanel* panel_to_move, LLPanel* target_panel, bool move_to_front) { LayoutPanel* embedded_panel_to_move = findEmbeddedPanel(panel_to_move); - LayoutPanel* embedded_target_panel = findEmbeddedPanel(target_panel); + LayoutPanel* embedded_target_panel = move_to_front ? *mPanels.begin() : findEmbeddedPanel(target_panel); if (!embedded_panel_to_move || !embedded_target_panel || embedded_panel_to_move == embedded_target_panel) { @@ -380,7 +380,7 @@ void LLLayoutStack::movePanel(LLPanel* panel_to_move, LLPanel* target_panel) } e_panel_list_t::iterator it = std::find(mPanels.begin(), mPanels.end(), embedded_panel_to_move); mPanels.erase(it); - it = std::find(mPanels.begin(), mPanels.end(), embedded_target_panel); + it = move_to_front ? mPanels.begin() : std::find(mPanels.begin(), mPanels.end(), embedded_target_panel); mPanels.insert(it, embedded_panel_to_move); } |