[tekui-devel] tekui: Cured minor hiccup in Canvas:askMinMax()

Timm S. Mueller tmueller at neoscientists.org
Fri Apr 11 00:30:25 CEST 2008


details:   http://hg.teklib.org/tekui/rev/96bd978241ce
changeset: 416:96bd978241ce
user:      Timm S. Mueller <tmueller at neoscientists.org>
date:      Wed Apr 09 23:41:07 2008 +0200
description:
Cured minor hiccup in Canvas:askMinMax()

diffs (14 lines):

diff -r bcfe4b15deab -r 96bd978241ce tek/class/ui/canvas.lua
--- a/tek/class/ui/canvas.lua	Wed Apr 09 21:59:17 2008 +0200
+++ b/tek/class/ui/canvas.lua	Wed Apr 09 23:41:07 2008 +0200
@@ -108,8 +108,8 @@ function Canvas:askMinMax(m1, m2, m3, m4
 	local c1, c2, c3, c4 = self.Object:askMinMax()
 	m1 = (m1 or 0) + c1
 	m2 = (m2 or 0) + c2
-	m3 = m3 and m3 + c3
-	m4 = m4 and m4 + c4
+	m3 = (m3 or c3) and (m3 or 0) + (c3 or 0)
+	m4 = (m4 or c4) and (m4 or 0) + (c4 or 0)
 	local s = self.ScrollGroup
 	local m1 = s.KeepMinWidth and m1 or 0
 	local m2 = s.KeepMinHeight and m2 or 0


More information about the tekui-devel mailing list