summaryrefslogtreecommitdiff
path: root/gtk2_ardour/marker_time_axis_view.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/marker_time_axis_view.cc')
-rw-r--r--gtk2_ardour/marker_time_axis_view.cc31
1 files changed, 15 insertions, 16 deletions
diff --git a/gtk2_ardour/marker_time_axis_view.cc b/gtk2_ardour/marker_time_axis_view.cc
index b1eb7066cd..89d9acd111 100644
--- a/gtk2_ardour/marker_time_axis_view.cc
+++ b/gtk2_ardour/marker_time_axis_view.cc
@@ -27,7 +27,6 @@
#include "marker_view.h"
#include "imageframe_view.h"
#include "imageframe_time_axis.h"
-#include "canvas-simplerect.h"
#include "public_editor.h"
#include "rgb_macros.h"
#include "gui_thread.h"
@@ -54,7 +53,7 @@ MarkerTimeAxisView::MarkerTimeAxisView(MarkerTimeAxis& tv)
canvas_group = new ArdourCanvas::Group (*_trackview.canvas_display);
- canvas_rect = new ArdourCanvas::SimpleRect (*canvas_group);
+ canvas_rect = new ArdourCanvas::Rectangle (*canvas_group);
canvas_rect->property_x1() = 0.0;
canvas_rect->property_y1() = 0.0;
canvas_rect->property_x2() = max_framepos;
@@ -64,9 +63,9 @@ MarkerTimeAxisView::MarkerTimeAxisView(MarkerTimeAxis& tv)
canvas_rect->signal_event().connect (sigc::bind (sigc::mem_fun (_trackview.editor, &PublicEditor::canvas_marker_time_axis_view_event), canvas_rect, &_trackview));
- _samples_per_unit = _trackview.editor.get_current_zoom() ;
+ _frames_per_pixel = _trackview.editor.get_current_zoom() ;
- _trackview.editor.ZoomChanged.connect (sigc::mem_fun(*this, &MarkerTimeAxisView::reset_samples_per_unit));
+ _trackview.editor.ZoomChanged.connect (sigc::mem_fun(*this, &MarkerTimeAxisView::reset_frames_per_pixel));
MarkerView::CatchDeletion.connect (*this, boost::bind (&MarkerTimeAxisView::remove_marker_view, this, _1), gui_context());
}
@@ -139,25 +138,25 @@ MarkerTimeAxisView::set_position(gdouble x, gdouble y)
}
/**
- * Sets the current samples per unit.
+ * Sets the current frames per pixel.
* this method tells each item upon the time axis of the change
*
- * @param spu the new samples per canvas unit value
+ * @param fpp the new frames per pixel value
*/
int
-MarkerTimeAxisView::set_samples_per_unit(gdouble spp)
+MarkerTimeAxisView::set_frames_per_pixel (double fpp)
{
- if(spp < 1.0) {
- return -1 ;
+ if (spp < 1.0) {
+ return -1;
}
- _samples_per_unit = spp ;
+ _frames_per_pixel = fpp;
- for(MarkerViewList::iterator i = marker_view_list.begin(); i != marker_view_list.end(); ++i)
- {
- (*i)->set_samples_per_unit(spp) ;
+ for (MarkerViewList::iterator i = marker_view_list.begin(); i != marker_view_list.end(); ++i) {
+ (*i)->set_frames_per_pixel (spp);
}
- return(0) ;
+
+ return 0;
}
/**
@@ -383,7 +382,7 @@ MarkerTimeAxisView::get_selected_time_axis_item()
*
*/
void
-MarkerTimeAxisView::reset_samples_per_unit ()
+MarkerTimeAxisView::reset_frames_per_pixel ()
{
- set_samples_per_unit(_trackview.editor.get_current_zoom()) ;
+ set_frames_per_pixel (_trackview.editor.get_current_zoom());
}