13
0

ruler: make ::set_metric() API consistent with constructor by using ptr

This commit is contained in:
Paul Davis 2021-12-24 15:34:18 -07:00
parent 8c2bd1a555
commit b2bd748672
2 changed files with 3 additions and 3 deletions

View File

@ -68,7 +68,7 @@ public:
void set_range (int64_t lower, int64_t upper); void set_range (int64_t lower, int64_t upper);
void set_font_description (Pango::FontDescription); void set_font_description (Pango::FontDescription);
void set_second_font_description (Pango::FontDescription); void set_second_font_description (Pango::FontDescription);
void set_metric (const Metric&); void set_metric (const Metric *);
void render (Rect const & area, Cairo::RefPtr<Cairo::Context>) const; void render (Rect const & area, Cairo::RefPtr<Cairo::Context>) const;

View File

@ -255,9 +255,9 @@ Ruler::set_divide_colors (Gtkmm2ext::Color t, Gtkmm2ext::Color b)
} }
void void
Ruler::set_metric (const Metric& m) Ruler::set_metric (const Metric* m)
{ {
_metric = &m; _metric = m;
_need_marks = true; _need_marks = true;
redraw (); redraw ();
} }