Drag zoom area now fills the whole canvas
git-svn-id: svn://localhost/ardour2/trunk@1188 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
f599eefa99
commit
317af79f13
|
@ -654,6 +654,7 @@ class Editor : public PublicEditor
|
|||
|
||||
double canvas_width;
|
||||
double canvas_height;
|
||||
double full_canvas_height;
|
||||
nframes_t last_canvas_frame;
|
||||
|
||||
bool track_canvas_map_handler (GdkEventAny*);
|
||||
|
|
|
@ -294,7 +294,6 @@ Editor::track_canvas_allocate (Gtk::Allocation alloc)
|
|||
bool
|
||||
Editor::track_canvas_idle ()
|
||||
{
|
||||
|
||||
if (canvas_idle_queued) {
|
||||
canvas_idle_queued = false;
|
||||
}
|
||||
|
@ -302,6 +301,27 @@ Editor::track_canvas_idle ()
|
|||
canvas_width = canvas_allocation.get_width();
|
||||
canvas_height = canvas_allocation.get_height();
|
||||
|
||||
full_canvas_height = canvas_height;
|
||||
|
||||
if (session) {
|
||||
TrackViewList::iterator i;
|
||||
double height = 0;
|
||||
|
||||
for (i = track_views.begin(); i != track_views.end(); ++i) {
|
||||
if ((*i)->control_parent) {
|
||||
height += (*i)->effective_height;
|
||||
height += track_spacing;
|
||||
}
|
||||
}
|
||||
|
||||
if (height) {
|
||||
height -= track_spacing;
|
||||
}
|
||||
|
||||
full_canvas_height = height;
|
||||
}
|
||||
|
||||
|
||||
zoom_range_clock.set ((nframes_t) floor ((canvas_width * frames_per_unit)));
|
||||
edit_cursor->set_position (edit_cursor->current_frame);
|
||||
playhead_cursor->set_position (playhead_cursor->current_frame);
|
||||
|
|
|
@ -2794,6 +2794,7 @@ Editor::region_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
set<Playlist*> affected_playlists;
|
||||
pair<set<Playlist*>::iterator,bool> insert_result;
|
||||
|
||||
// TODO: Crossfades need to be copied!
|
||||
for (list<RegionView*>::const_iterator i = selection->regions.by_layer().begin(); i != selection->regions.by_layer().end(); ++i) {
|
||||
RegionView* rv;
|
||||
|
||||
|
@ -2835,6 +2836,8 @@ Editor::region_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
new_regionviews.push_back (latest_regionview);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (new_regionviews.empty()) {
|
||||
return;
|
||||
|
@ -4599,7 +4602,7 @@ Editor::reposition_zoom_rect (nframes_t start, nframes_t end)
|
|||
{
|
||||
double x1 = frame_to_pixel (start);
|
||||
double x2 = frame_to_pixel (end);
|
||||
double y2 = canvas_height - 2;
|
||||
double y2 = full_canvas_height - 1.0;
|
||||
|
||||
zoom_rect->property_x1() = x1;
|
||||
zoom_rect->property_y1() = 1.0;
|
||||
|
|
Loading…
Reference in New Issue
Block a user