mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-21 22:04:56 -06:00
Fixed minor bugs in Ruler; added ASSERT_INDEX macro - an ArrayCtrl column integrity check
git-svn-id: svn://ultimatepp.org/upp/trunk@696 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
81a749cf59
commit
0bc12c910c
2 changed files with 4 additions and 2 deletions
|
|
@ -222,7 +222,7 @@ void RulerCtrl::Paint(Draw& draw)
|
|||
|
||||
enum {
|
||||
SMALL_LIMIT = 100,
|
||||
TEXT_LIMIT = 50,
|
||||
// TEXT_LIMIT = 50,
|
||||
TGAP = 3,
|
||||
HGAP = 2,
|
||||
VGAP = 0,
|
||||
|
|
@ -261,7 +261,7 @@ void RulerCtrl::Paint(Draw& draw)
|
|||
rep_count = ceil(pos2 / text_repeat) - floor(pos1 / text_repeat) + 1;
|
||||
}
|
||||
if(!text_step.IsEmpty() && (!text_value.IsEmpty() || text_convert)
|
||||
&& rep_count > 0 && rep_count * text_step.GetCount() <= TEXT_LIMIT) {
|
||||
&& rep_count > 0 /*&& rep_count * text_step.GetCount() <= TEXT_LIMIT*/) {
|
||||
int ix = BinFindIndex(text_step, pos1 - rep_index * text_repeat);
|
||||
int ppos = (is_right ? SMALL_SIZE : cheight - cy - SMALL_SIZE);
|
||||
for(int c = fround(rep_count); --c >= 0; ix = 0, rep_index++) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
NAMESPACE_UPP
|
||||
|
||||
#define ASSERT_INDEX(arrayctrl, index) ASSERT(arrayctrl.GetIndexCount() == index)
|
||||
|
||||
#define TOOL(x) \
|
||||
void COMBINE(Tool, x)(Bar& bar); \
|
||||
void COMBINE(On, x)(); \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue