X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fviews%2Ftrace%2Fview.cpp;h=9cd90be83015bafd4f709dc9d7a376418d11e56c;hb=056f443e2a6f8db80161ce08d7ff8111175bc3d6;hp=292933e7eefa70abb5753a0a3e66f9614292415a;hpb=ffc00fdd5946593ad2a587078fd4ee9ba0a507ec;p=pulseview.git diff --git a/pv/views/trace/view.cpp b/pv/views/trace/view.cpp index 292933e..9cd90be 100644 --- a/pv/views/trace/view.cpp +++ b/pv/views/trace/view.cpp @@ -506,6 +506,11 @@ const pv::util::Timestamp& View::tick_period() const return tick_period_; } +unsigned int View::minor_tick_count() const +{ + return minor_tick_count_; +} + void View::set_tick_period(const pv::util::Timestamp& tick_period) { if (tick_period_ != tick_period) { @@ -896,6 +901,7 @@ void View::calculate_tick_spacing() (ScaleUnits[unit++] + tp_margin); } while (tp_with_margin < min_period && unit < countof(ScaleUnits)); + minor_tick_count_ = (unit == 2) ? (4) : (5); tick_period = order_decimal * ScaleUnits[unit - 1]; tick_prefix = static_cast( (order - pv::util::exponent(pv::util::SIPrefix::yocto)) / 3);