Visual tweaks to Soundcloud panel
[ardour.git] / gtk2_ardour / step_editor.cc
index a75f0f98e45bc403827c9ac5931f58fd252dcad3..4665da348b0079750b698937d300011329317eaa 100644 (file)
@@ -149,7 +149,7 @@ bool
 StepEditor::step_editor_hidden (GdkEventAny*)
 {
         step_editor_hide ();
-        return true;
+        return true; // XXX remember position ?!
 }
 
 void
@@ -279,8 +279,8 @@ StepEditor::step_add_note (uint8_t channel, uint8_t pitch, uint8_t velocity, Evo
 
         framepos_t fpos = step_edit_region_view->region_beats_to_absolute_frames (step_edit_beat_pos + beat_duration);
 
-        if (fpos >= (_editor.leftmost_position() + _editor.current_page_frames())) {
-                _editor.reset_x_origin (fpos - (_editor.current_page_frames()/4));
+        if (fpos >= (_editor.leftmost_sample() + _editor.current_page_samples())) {
+                _editor.reset_x_origin (fpos - (_editor.current_page_samples()/4));
         }
 
         Evoral::MusicalTime at = step_edit_beat_pos;