temporal: avoid using superclock in Editor::initialize_canvas before creating the session

cb78043adc "Indicate selection extents in time ruler" introduced use of
superclock before it has been set. But as it only is used at time 0, the
actual superclock doesn't matter. Still, we work around it in order to
avoid triggering any warnings of uninitialized use.
This commit is contained in:
Mads Kiilerich 2023-06-11 14:51:45 +02:00 committed by Paul Davis
parent 51333165e8
commit 226ff63e3c
1 changed files with 1 additions and 1 deletions

View File

@ -298,7 +298,7 @@ ArdourMarker::ArdourMarker (PublicEditor& ed, ArdourCanvas::Item& parent, std::s
}
_position = pos;
unit_position = editor.sample_to_pixel (pos.samples());
unit_position = editor.sample_to_pixel (pos.is_zero () ? 0 : pos.samples());
unit_position -= _shift;
group = new ArdourCanvas::Container (&parent, ArdourCanvas::Duple (unit_position, 1));