Clamp left hand side zoom drags of the summary (fixes
#4317). git-svn-id: svn://localhost/ardour2/branches/3.0@10075 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
aadc91d7d1
commit
74796c7a53
@ -608,7 +608,7 @@ EditorSummary::set_editor (double const x, double const y)
|
||||
* x and y parameters are specified in summary coordinates.
|
||||
*/
|
||||
void
|
||||
EditorSummary::set_editor (pair<double,double> const & x, double const y)
|
||||
EditorSummary::set_editor (pair<double,double> const x, double const y)
|
||||
{
|
||||
if (_editor->pending_visual_change.idle_handler_id >= 0) {
|
||||
/* see comment in other set_editor () */
|
||||
@ -624,7 +624,7 @@ EditorSummary::set_editor (pair<double,double> const & x, double const y)
|
||||
* x and y parameters are specified in summary coordinates.
|
||||
*/
|
||||
void
|
||||
EditorSummary::set_editor (pair<double,double> const & x, pair<double, double> const & y)
|
||||
EditorSummary::set_editor (pair<double,double> const x, pair<double, double> const y)
|
||||
{
|
||||
if (_editor->pending_visual_change.idle_handler_id >= 0) {
|
||||
/* see comment in other set_editor () */
|
||||
@ -640,8 +640,12 @@ EditorSummary::set_editor (pair<double,double> const & x, pair<double, double> c
|
||||
* @param x new x left position in summary coordinates.
|
||||
*/
|
||||
void
|
||||
EditorSummary::set_editor_x (double const x)
|
||||
EditorSummary::set_editor_x (double x)
|
||||
{
|
||||
if (x < 0) {
|
||||
x = 0;
|
||||
}
|
||||
|
||||
_editor->reset_x_origin (x / _x_scale + _start);
|
||||
}
|
||||
|
||||
@ -650,8 +654,16 @@ EditorSummary::set_editor_x (double const x)
|
||||
* @param x new x range in summary coordinates.
|
||||
*/
|
||||
void
|
||||
EditorSummary::set_editor_x (pair<double, double> const & x)
|
||||
EditorSummary::set_editor_x (pair<double, double> x)
|
||||
{
|
||||
if (x.first < 0) {
|
||||
x.first = 0;
|
||||
}
|
||||
|
||||
if (x.second < 0) {
|
||||
x.second = 1;
|
||||
}
|
||||
|
||||
_editor->reset_x_origin (x.first / _x_scale + _start);
|
||||
|
||||
double const nx = (
|
||||
@ -694,7 +706,7 @@ EditorSummary::set_editor_y (double const y)
|
||||
* @param y new editor range in summary coodinates.
|
||||
*/
|
||||
void
|
||||
EditorSummary::set_editor_y (pair<double, double> const & y)
|
||||
EditorSummary::set_editor_y (pair<double, double> const y)
|
||||
{
|
||||
/* Compute current height of tracks between y.first and y.second. We add up
|
||||
the total height into `total_height' and the height of complete tracks into
|
||||
|
@ -70,12 +70,12 @@ private:
|
||||
void render_region (RegionView*, cairo_t*, double) const;
|
||||
void get_editor (std::pair<double, double> *, std::pair<double, double> *) const;
|
||||
void set_editor (double, double);
|
||||
void set_editor (std::pair<double, double> const &, double);
|
||||
void set_editor (std::pair<double, double> const &, std::pair<double, double> const &);
|
||||
void set_editor (std::pair<double, double>, double);
|
||||
void set_editor (std::pair<double, double>, std::pair<double, double>);
|
||||
void set_editor_x (double);
|
||||
void set_editor_x (std::pair<double, double> const &);
|
||||
void set_editor_x (std::pair<double, double>);
|
||||
void set_editor_y (double);
|
||||
void set_editor_y (std::pair<double, double> const &);
|
||||
void set_editor_y (std::pair<double, double>);
|
||||
void playhead_position_changed (framepos_t);
|
||||
double summary_y_to_editor (double) const;
|
||||
double editor_y_to_summary (double) const;
|
||||
|
Loading…
Reference in New Issue
Block a user