summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_ops.cc
diff options
context:
space:
mode:
authorNick Mainsbridge <beatroute@iprimus.com.au>2008-09-03 18:15:31 +0000
committerNick Mainsbridge <beatroute@iprimus.com.au>2008-09-03 18:15:31 +0000
commite11544b59aaf84e2d4ed1a6fb57e1ae5e6e05ebf (patch)
tree9a6d8fc657d5f187113e3342924f5080bc48c3c4 /gtk2_ardour/editor_ops.cc
parent860125cb532e0987692e317ca8f4d08a0b76dda0 (diff)
Unify the canvases by moving groups around rather than using set_scrolling_region () (eliminates the double-draw during zoom on linux), fix verbose_time_cursor clamping, make fonts smaller on location dialog buttons, hopefully improve performance when dragging multiple regions on the same track, reduce some redrawing of clocks (still not done for samples clock), allow NLS=1 on OSX, other canvas performance improvements on OSX, build SAE-us.bindings (even though they are incomplete for now).
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3707 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r--gtk2_ardour/editor_ops.cc23
1 files changed, 13 insertions, 10 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index fa5c3d9949..c3c6318178 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -1534,7 +1534,7 @@ Editor::scroll_tracks_down_line ()
{
Gtk::Adjustment* adj = edit_vscrollbar.get_adjustment();
- double vert_value = adj->get_value() + 20;
+ double vert_value = adj->get_value() + 60;
if (vert_value>adj->get_upper() - canvas_height) {
vert_value = adj->get_upper() - canvas_height;
@@ -1546,7 +1546,7 @@ void
Editor::scroll_tracks_up_line ()
{
Gtk::Adjustment* adj = edit_vscrollbar.get_adjustment();
- adj->set_value (adj->get_value() - 20);
+ adj->set_value (adj->get_value() - 60);
}
/* ZOOM */
@@ -1860,8 +1860,9 @@ Editor::temporal_zoom_by_frame (nframes64_t start, nframes64_t end, const string
void
Editor::temporal_zoom_to_frame (bool coarser, nframes64_t frame)
{
- if (!session) return;
-
+ if (!session) {
+ return;
+ }
double range_before = frame - leftmost_frame;
double new_fpu;
@@ -1875,12 +1876,15 @@ Editor::temporal_zoom_to_frame (bool coarser, nframes64_t frame)
range_before /= 1.61803399;
}
- if (new_fpu == frames_per_unit) return;
+ if (new_fpu == frames_per_unit) {
+ return;
+ }
nframes64_t new_leftmost = frame - (nframes64_t)range_before;
- if (new_leftmost > frame) new_leftmost = 0;
-
+ if (new_leftmost > frame) {
+ new_leftmost = 0;
+ }
// begin_reversible_command (_("zoom to frame"));
// session->add_undo (bind (mem_fun(*this, &Editor::reposition_and_zoom), leftmost_frame, frames_per_unit));
// session->add_redo (bind (mem_fun(*this, &Editor::reposition_and_zoom), new_leftmost, new_fpu));
@@ -2198,8 +2202,8 @@ Editor::insert_region_list_drag (boost::shared_ptr<AudioRegion> region, int x, i
boost::shared_ptr<Playlist> playlist;
track_canvas->window_to_world (x, y, wx, wy);
- wx += horizontal_adjustment.get_value();
- wy += vertical_adjustment.get_value();
+ //wx += horizontal_adjustment.get_value();
+ //wy += vertical_adjustment.get_value();
GdkEvent event;
event.type = GDK_BUTTON_RELEASE;
@@ -5953,7 +5957,6 @@ Editor::fit_tracks ()
first_y_pos = std::min ((*t)->y_position, first_y_pos);
}
-
vertical_adjustment.set_value (first_y_pos);
redo_visual_stack.push_back (current_visual_state());