From 1bb2778224982aea7b9781c6559bb659983a400f Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Wed, 13 Jun 2012 11:25:20 -0700 Subject: We need to guard against cases where some PI controls are using HottextUnit but don't actually allow uses to change those units. Signed-off-by: Nivesh Rajbhandari --- js/panels/properties.reel/properties.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js index 33e66515..97dc017d 100755 --- a/js/panels/properties.reel/properties.js +++ b/js/panels/properties.reel/properties.js @@ -310,9 +310,13 @@ exports.Properties = Montage.create(Component, { if(currentValue == null) { currentValue = control.defaultValue; } - currentValue = document.application.njUtils.getValueAndUnits(currentValue); - this.customSections[i].content.controls[control.id + "Units"] = currentValue[1] || "px"; - this.customSections[i].content.controls[control.id] = currentValue[0]; + if(typeof(currentValue) === "string") { + currentValue = document.application.njUtils.getValueAndUnits(currentValue); + this.customSections[i].content.controls[control.id + "Units"] = currentValue[1] || "px"; + this.customSections[i].content.controls[control.id] = currentValue[0]; + } else { + this.customSections[i].content.controls[control.id] = currentValue; + } } else { if(currentValue === null) { currentValue = control.defaultValue; -- cgit v1.2.3