* In single window navigation mode, when navigating into a directory which had no viewstate yet (new folder) or if
fViewState didn't change, fTitleView wouldn't be reset and updated to the new column set. (unfortunately the column state is managed separately from the rest of the view state). That would cause crashes for example when switching to a directory with fewer columns and triggering a redraw of a column that shouldn't be there anymore. Fixes #3710. * TitleView::Reset didn't invalidate the view and would leave the old columns there until a redraw was triggered externally. * Minor cleanup git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31378 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
deb0a3ed2f
commit
f207162e07
@ -7662,10 +7662,10 @@ BPoseView::SwitchDir(const entry_ref *newDirRef, AttributeStreamNode *node)
|
||||
viewStateRestored = (fViewState != previousState);
|
||||
}
|
||||
|
||||
if (viewStateRestored) {
|
||||
// Make sure the title view reset its items
|
||||
fTitleView->Reset();
|
||||
// Make sure fTitleView is rebuilt, as fColumnList might have changed
|
||||
fTitleView->Reset();
|
||||
|
||||
if (viewStateRestored) {
|
||||
if (ViewMode() == kListMode && oldMode != kListMode) {
|
||||
|
||||
MoveBy(0, kTitleViewHeight + 1);
|
||||
@ -7720,7 +7720,8 @@ BPoseView::SwitchDir(const entry_ref *newDirRef, AttributeStreamNode *node)
|
||||
|
||||
if (ContainerWindow()->IsTrash())
|
||||
AddTrashPoses();
|
||||
else AddPoses(TargetModel());
|
||||
else
|
||||
AddPoses(TargetModel());
|
||||
TargetModel()->CloseNode();
|
||||
|
||||
Invalidate();
|
||||
|
@ -153,6 +153,7 @@ BTitleView::Reset()
|
||||
break;
|
||||
fTitleList.AddItem(new BColumnTitle(this, column));
|
||||
}
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user