.TCtrlLib: relaxed rules for drawing Ruler steps

git-svn-id: svn://ultimatepp.org/upp/trunk@2264 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
rylek 2010-03-24 06:47:38 +00:00
parent b3dba1e925
commit 12c814813b

View file

@ -238,7 +238,7 @@ void RulerCtrl::Paint(Draw& draw)
rep_count = ceil(pos2 / small_repeat) - floor(pos1 / small_repeat);
}
if(!small_step.IsEmpty() && rep_count > 0
&& rep_count * small_step.GetCount() * 3 <= cli2 - cli1) {
&& rep_count * small_step.GetCount() <= cli2 - cli1) {
int ix = BinFindIndex(small_step, pos1 - rep_delta);
int ppos = (is_right ? 0 : cheight - SMALL_SIZE);
for(int c = fround(rep_count); --c >= 0; ix = 0, rep_delta += small_repeat) {