- const unsigned int prefix = (order - FirstSIPrefixPower) / 3;
- assert(prefix >= 0);
- assert(prefix < countof(SIPrefixes));
+ do
+ {
+ tick_period = order_decimal * ScaleUnits[unit++];
+ } while (tick_period < min_period && unit < countof(ScaleUnits));
+
+ prefix = (order - FirstSIPrefixPower) / 3;
+ assert(prefix < countof(SIPrefixes));
+
+
+ typical_width = p.boundingRect(0, 0, INT_MAX, INT_MAX,
+ AlignLeft | AlignTop, format_time(_view.offset(),
+ prefix)).width() + MinValueSpacing;