summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2014-06-23 15:17:19 +0200
committerjmoenig <jens@moenig.org>2014-06-23 15:17:19 +0200
commit90b30ceed5abcee1dc05ed79afbfb9b25935f113 (patch)
treee27679ba80e14fbe0035550e99e9023ad613e537
parente16f008ee88aa3231657b4fafe848255088907ff (diff)
downloadsnap-90b30ceed5abcee1dc05ed79afbfb9b25935f113.tar.gz
snap-90b30ceed5abcee1dc05ed79afbfb9b25935f113.zip
Morphic tweaks
-rw-r--r--morphic.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/morphic.js b/morphic.js
index b951f3a..3aa5972 100644
--- a/morphic.js
+++ b/morphic.js
@@ -6205,7 +6205,6 @@ InspectorMorph.prototype.updateCurrentSelection = function () {
if (isNil(sel)) {return; }
val = this.target[sel];
- if (this.currentProperty === val) {return; }
this.currentProperty = val;
if (isNil(val)) {
txt = 'NULL';
@@ -6214,6 +6213,7 @@ InspectorMorph.prototype.updateCurrentSelection = function () {
} else {
txt = val.toString();
}
+ if (this.detail.contents.children[0].text === txt) {return; }
cnts = new TextMorph(txt);
cnts.isEditable = true;
cnts.enableSelecting();
@@ -6610,8 +6610,12 @@ InspectorMorph.prototype.removeProperty = function () {
// InspectorMorph stepping
InspectorMorph.prototype.step = function () {
- if (!isObject(this.currentProperty)) {return; }
this.updateCurrentSelection();
+ var lbl = this.target.toString();
+ if (this.label.text === lbl) {return; }
+ this.label.text = lbl;
+ this.label.drawNew();
+ this.fixLayout();
};
// MenuMorph ///////////////////////////////////////////////////////////
@@ -9078,6 +9082,7 @@ ListMorph.prototype.buildListContents = function () {
};
ListMorph.prototype.select = function (item, trigger) {
+ if (isNil(item)) {return; }
this.selected = item;
this.active = trigger;
if (this.action) {