aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-06-13 11:25:20 -0700
committerNivesh Rajbhandari2012-06-13 11:25:20 -0700
commit1bb2778224982aea7b9781c6559bb659983a400f (patch)
treeb8dbd66cd038cf06dd40eb51f2bcd793540d6a0c
parent1cfbfc91815b04dc2a5b090c5e05e300b9371eb7 (diff)
downloadninja-1bb2778224982aea7b9781c6559bb659983a400f.tar.gz
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 <mqg734@motorola.com>
-rwxr-xr-xjs/panels/properties.reel/properties.js10
1 files 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, {
310 if(currentValue == null) { 310 if(currentValue == null) {
311 currentValue = control.defaultValue; 311 currentValue = control.defaultValue;
312 } 312 }
313 currentValue = document.application.njUtils.getValueAndUnits(currentValue); 313 if(typeof(currentValue) === "string") {
314 this.customSections[i].content.controls[control.id + "Units"] = currentValue[1] || "px"; 314 currentValue = document.application.njUtils.getValueAndUnits(currentValue);
315 this.customSections[i].content.controls[control.id] = currentValue[0]; 315 this.customSections[i].content.controls[control.id + "Units"] = currentValue[1] || "px";
316 this.customSections[i].content.controls[control.id] = currentValue[0];
317 } else {
318 this.customSections[i].content.controls[control.id] = currentValue;
319 }
316 } else { 320 } else {
317 if(currentValue === null) { 321 if(currentValue === null) {
318 currentValue = control.defaultValue; 322 currentValue = control.defaultValue;