Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
66d97849
Commit
66d97849
authored
13 years ago
by
Merov Linden
Browse files
Options
Downloads
Patches
Plain Diff
EXP-1353 : Fix crashes when teleport by making the teleport history less naive about its past state
parent
67a61877
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/newview/llpanelteleporthistory.cpp
+44
-28
44 additions, 28 deletions
indra/newview/llpanelteleporthistory.cpp
indra/newview/llteleporthistorystorage.cpp
+1
-0
1 addition, 0 deletions
indra/newview/llteleporthistorystorage.cpp
with
45 additions
and
28 deletions
indra/newview/llpanelteleporthistory.cpp
+
44
−
28
View file @
66d97849
...
@@ -679,29 +679,32 @@ void LLTeleportHistoryPanel::refresh()
...
@@ -679,29 +679,32 @@ void LLTeleportHistoryPanel::refresh()
// tab_boundary_date would be earliest possible date for this tab
// tab_boundary_date would be earliest possible date for this tab
S32
tab_idx
=
0
;
S32
tab_idx
=
0
;
getNextTab
(
date
,
tab_idx
,
tab_boundary_date
);
getNextTab
(
date
,
tab_idx
,
tab_boundary_date
);
tab_idx
=
mItemContainers
.
size
()
-
1
-
tab_idx
;
LLAccordionCtrlTab
*
tab
=
mItemContainers
.
get
(
mItemContainers
.
size
()
-
1
-
tab_idx
);
if
(
tab_idx
>=
0
)
tab
->
setVisible
(
true
);
// Expand all accordion tabs when filtering
if
(
!
sFilterSubString
.
empty
())
{
{
//store accordion tab state when filter is not empty
LLAccordionCtrlTab
*
tab
=
mItemContainers
.
get
(
tab_idx
);
tab
->
notifyChildren
(
LLSD
().
with
(
"action"
,
"store_state"
));
tab
->
setVisible
(
true
);
tab
->
setDisplayChildren
(
true
);
// Expand all accordion tabs when filtering
}
if
(
!
sFilterSubString
.
empty
())
// Restore each tab's expand state when not filtering
{
else
//store accordion tab state when filter is not empty
{
tab
->
notifyChildren
(
LLSD
().
with
(
"action"
,
"store_state"
));
bool
collapsed
=
isAccordionCollapsedByUser
(
tab
);
tab
->
setDisplayChildren
(
!
collapsed
);
//restore accordion state after all those accodrion tabmanipulations
tab
->
setDisplayChildren
(
true
);
tab
->
notifyChildren
(
LLSD
().
with
(
"action"
,
"restore_state"
));
}
}
// Restore each tab's expand state when not filtering
else
{
bool
collapsed
=
isAccordionCollapsedByUser
(
tab
);
tab
->
setDisplayChildren
(
!
collapsed
);
//restore accordion state after all those accodrion tabmanipulations
tab
->
notifyChildren
(
LLSD
().
with
(
"action"
,
"restore_state"
));
}
curr_flat_view
=
getFlatListViewFromTab
(
tab
);
curr_flat_view
=
getFlatListViewFromTab
(
tab
);
}
}
}
if
(
curr_flat_view
)
if
(
curr_flat_view
)
...
@@ -760,7 +763,12 @@ void LLTeleportHistoryPanel::onTeleportHistoryChange(S32 removed_index)
...
@@ -760,7 +763,12 @@ void LLTeleportHistoryPanel::onTeleportHistoryChange(S32 removed_index)
void
LLTeleportHistoryPanel
::
replaceItem
(
S32
removed_index
)
void
LLTeleportHistoryPanel
::
replaceItem
(
S32
removed_index
)
{
{
// Flat list for 'Today' (mItemContainers keeps accordion tabs in reverse order)
// Flat list for 'Today' (mItemContainers keeps accordion tabs in reverse order)
LLFlatListView
*
fv
=
getFlatListViewFromTab
(
mItemContainers
[
mItemContainers
.
size
()
-
1
]);
LLFlatListView
*
fv
=
NULL
;
if
(
mItemContainers
.
size
()
>
0
)
{
fv
=
getFlatListViewFromTab
(
mItemContainers
[
mItemContainers
.
size
()
-
1
]);
}
// Empty flat list for 'Today' means that other flat lists are empty as well,
// Empty flat list for 'Today' means that other flat lists are empty as well,
// so all items from teleport history should be added.
// so all items from teleport history should be added.
...
@@ -828,19 +836,27 @@ void LLTeleportHistoryPanel::showTeleportHistory()
...
@@ -828,19 +836,27 @@ void LLTeleportHistoryPanel::showTeleportHistory()
// Starting to add items from last one, in reverse order,
// Starting to add items from last one, in reverse order,
// since TeleportHistory keeps most recent item at the end
// since TeleportHistory keeps most recent item at the end
if
(
!
mTeleportHistory
)
{
mTeleportHistory
=
LLTeleportHistoryStorage
::
getInstance
();
}
mCurrentItem
=
mTeleportHistory
->
getItems
().
size
()
-
1
;
mCurrentItem
=
mTeleportHistory
->
getItems
().
size
()
-
1
;
for
(
S32
n
=
mItemContainers
.
size
()
-
1
;
n
>=
0
;
--
n
)
for
(
S32
n
=
mItemContainers
.
size
()
-
1
;
n
>=
0
;
--
n
)
{
{
LLAccordionCtrlTab
*
tab
=
mItemContainers
.
get
(
n
);
LLAccordionCtrlTab
*
tab
=
mItemContainers
.
get
(
n
);
tab
->
setVisible
(
false
);
if
(
tab
)
LLFlatListView
*
fv
=
getFlatListViewFromTab
(
tab
);
if
(
fv
)
{
{
// Detached panels are managed by LLTeleportHistoryFlatItemStorage
tab
->
setVisible
(
false
);
std
::
vector
<
LLPanel
*>
detached_items
;
fv
->
detachItems
(
detached_items
);
LLFlatListView
*
fv
=
getFlatListViewFromTab
(
tab
);
if
(
fv
)
{
// Detached panels are managed by LLTeleportHistoryFlatItemStorage
std
::
vector
<
LLPanel
*>
detached_items
;
fv
->
detachItems
(
detached_items
);
}
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llteleporthistorystorage.cpp
+
1
−
0
View file @
66d97849
...
@@ -66,6 +66,7 @@ struct LLSortItemsByDate
...
@@ -66,6 +66,7 @@ struct LLSortItemsByDate
LLTeleportHistoryStorage
::
LLTeleportHistoryStorage
()
:
LLTeleportHistoryStorage
::
LLTeleportHistoryStorage
()
:
mFilename
(
"teleport_history.txt"
)
mFilename
(
"teleport_history.txt"
)
{
{
mItems
.
clear
();
LLTeleportHistory
*
th
=
LLTeleportHistory
::
getInstance
();
LLTeleportHistory
*
th
=
LLTeleportHistory
::
getInstance
();
if
(
th
)
if
(
th
)
th
->
setHistoryChangedCallback
(
boost
::
bind
(
&
LLTeleportHistoryStorage
::
onTeleportHistoryChange
,
this
));
th
->
setHistoryChangedCallback
(
boost
::
bind
(
&
LLTeleportHistoryStorage
::
onTeleportHistoryChange
,
this
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment