add Canvas::Ruler::set_metric() to allow ruler metrics to be changed dynamically

This commit is contained in:
Paul Davis 2014-09-05 14:45:27 -04:00
parent 1a6136e1e3
commit 94adde7ebb
2 changed files with 9 additions and 0 deletions

View file

@ -180,3 +180,11 @@ Ruler::render (Rect const & area, Cairo::RefPtr<Cairo::Context> cr) const
/* done! */
}
void
Ruler::set_metric (const Metric& m)
{
_metric = &m;
_need_marks = true;
redraw ();
}