From 0e52c41f35764f37f1e00d30203d3e6e6122a0da Mon Sep 17 00:00:00 2001 From: stefan Date: Mon, 16 Feb 2009 21:19:51 +0000 Subject: [PATCH] Fix height calculation for Multilink.menu() git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4134 57a73879-2fb5-44c3-a270-3262357dd7e2 --- roundup/cgi/templating.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/roundup/cgi/templating.py b/roundup/cgi/templating.py index 0cf33a9..73459f4 100644 --- a/roundup/cgi/templating.py +++ b/roundup/cgi/templating.py @@ -2083,7 +2083,18 @@ class MultilinkHTMLProperty(HTMLProperty): for opt in linkcl.filter(None, conditions, sort_on) if self._db.security.hasPermission("View", self._client.userid, linkcl.classname, itemid=opt)] - height = height or min(len(options), 7) + + # make sure we list the current values if they're retired + for val in value: + if val not in options: + options.insert(0, val) + + if not height: + height = len(options) + if value: + # The "no selection" option. + height += 1 + height = min(height, 7) l = ['