move grid updating code and members into EditingContext

This commit is contained in:
Paul Davis 2025-01-29 10:52:51 -07:00
parent ef6502d88d
commit 852ad9a7da
8 changed files with 32 additions and 28 deletions

View file

@ -154,7 +154,6 @@
#include "selection_properties_box.h"
#include "simple_progress_dialog.h"
#include "sfdb_ui.h"
#include "grid_lines.h"
#include "time_axis_view.h"
#include "timers.h"
#include "ui_config.h"
@ -318,7 +317,6 @@ Editor::Editor ()
, _stationary_playhead (false)
, _maximised (false)
, global_rect_group (0)
, time_line_group (0)
, tempo_marker_menu (0)
, meter_marker_menu (0)
, bbt_marker_menu (0)
@ -3406,27 +3404,6 @@ Editor::cycle_marker_click_behavior ()
}
}
void
Editor::update_grid ()
{
if (!_session) {
return;
}
if (_grid_type == GridTypeNone) {
hide_grid_lines ();
} else if (grid_musical()) {
Temporal::TempoMapPoints grid;
grid.reserve (4096);
if (bbt_ruler_scale != bbt_show_many) {
compute_current_bbt_points (grid, _leftmost_sample, _leftmost_sample + current_page_samples());
}
maybe_draw_grid_lines (time_line_group);
} else {
maybe_draw_grid_lines (time_line_group);
}
}
void
Editor::toggle_stationary_playhead ()
{