Backward compatibility mode (with fix): size now also accepts sizing mode as string (for supporting GF180 DRC decks properly)

This commit is contained in:
Matthias Koefferlein
2024-07-03 22:59:31 +02:00
parent 809f8a8256
commit 4a2d1be8bf
4 changed files with 5 additions and 0 deletions
@@ -4805,6 +4805,10 @@ TP_SCRIPT
n = 1
args.each do |a|
# accept DRCSizingMode as string as well, i.e. "size(l1, 'square_limit')"
if a.is_a?(String) && @engine.respond_to?(a.to_sym)
a = @engine.send(a.to_sym)
end
if a.is_a?(1.class) || a.is_a?(Float)
v = @engine._make_value(a)
v.abs > dist && dist = v.abs