Made a track expand when the dragging track is going to be dragged
inside
This commit is contained in:
parent
1951324726
commit
aa5cf0ea3a
2 changed files with 22 additions and 1 deletions
|
|
@ -342,6 +342,8 @@ TimelineHeaderContainer::layout_headers()
|
|||
if(!gdkWindow)
|
||||
return;
|
||||
|
||||
bool headers_shown = false;
|
||||
|
||||
TimelineLayoutHelper &layout_helper =
|
||||
timelineWidget.layoutHelper;
|
||||
const TimelineLayoutHelper::TrackTree &layout_tree =
|
||||
|
|
@ -368,12 +370,20 @@ TimelineHeaderContainer::layout_headers()
|
|||
// Apply the allocation to the header
|
||||
widget.size_allocate (*header_rect);
|
||||
if(!widget.is_visible())
|
||||
widget.show();
|
||||
{
|
||||
widget.show();
|
||||
headers_shown = true;
|
||||
}
|
||||
}
|
||||
else // No header rect, so the track must be hidden
|
||||
if(widget.is_visible())
|
||||
widget.hide();
|
||||
}
|
||||
|
||||
// If headers have been shown while we're dragging, the dragging
|
||||
// branch headers have to be brought back to the top again
|
||||
if(headers_shown && layout_helper.is_dragging_track())
|
||||
raise_recursive(layout_helper.get_dragging_track_iter());
|
||||
|
||||
// Repaint the background of our parenting
|
||||
queue_draw();
|
||||
|
|
|
|||
|
|
@ -228,8 +228,19 @@ TimelineLayoutHelper::drag_to_point(const Gdk::Point &mouse_point)
|
|||
// Did we get a drop point?
|
||||
if(drop.relation != None)
|
||||
{
|
||||
REQUIRE(*drop.target);
|
||||
shared_ptr<timeline::Track> target_timeline_track =
|
||||
lookup_timeline_track(*drop.target);
|
||||
|
||||
apply_drop_to_layout_tree(drop);
|
||||
dropPoint = drop;
|
||||
|
||||
if((drop.relation == FirstChild || drop.relation == LastChild)&&
|
||||
!target_timeline_track->get_expanded())
|
||||
{
|
||||
target_timeline_track->expand_collapse(Track::Expand);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
update_layout();
|
||||
|
|
|
|||
Loading…
Reference in a new issue