}
group->set_x_position (new_unit_pos);
-
PositionChanged (frame_position, src); /* EMIT_SIGNAL */
return true;
item_duration = dur;
- reset_width_dependent_items (trackview.editor().sample_to_pixel (dur));
+ double end_pixel = trackview.editor().sample_to_pixel (frame_position + dur);
+ double first_pixel = trackview.editor().sample_to_pixel (frame_position);
+
+ reset_width_dependent_items (end_pixel - first_pixel);
DurationChanged (dur, src); /* EMIT_SIGNAL */
return true;
{
samples_per_pixel = fpp;
set_position (this->get_position(), this);
- reset_width_dependent_items ((double) get_duration() / samples_per_pixel);
+
+ double end_pixel = trackview.editor().sample_to_pixel (frame_position + get_duration());
+ double first_pixel = trackview.editor().sample_to_pixel (frame_position);
+
+ reset_width_dependent_items (end_pixel - first_pixel);
}
void
if (frame) {
frame->show();
+ /* Note: x0 is always zero - the position is defined by
+ * the position of the group, not the frame.
+ */
frame->set_x1 (pixel_width);
if (selection_frame) {