kopia lustrzana https://github.com/backface/turtlestitch
shadow inherited scripts on keyboard entry
rodzic
699515b317
commit
695e141f33
|
@ -3723,7 +3723,7 @@ BlockMorph.prototype.mouseClickLeft = function () {
|
||||||
shiftClicked = this.world().currentKey === 16,
|
shiftClicked = this.world().currentKey === 16,
|
||||||
stage;
|
stage;
|
||||||
if (shiftClicked && !this.isTemplate) {
|
if (shiftClicked && !this.isTemplate) {
|
||||||
return this.focus();
|
return this.selectForEdit().focus(); // enable coopy-on-edit
|
||||||
}
|
}
|
||||||
if (top instanceof PrototypeHatBlockMorph) {
|
if (top instanceof PrototypeHatBlockMorph) {
|
||||||
return top.mouseClickLeft();
|
return top.mouseClickLeft();
|
||||||
|
@ -6635,12 +6635,14 @@ ScriptsMorph.prototype.selectForEdit = function () {
|
||||||
// ScriptsMorph keyboard support
|
// ScriptsMorph keyboard support
|
||||||
|
|
||||||
ScriptsMorph.prototype.edit = function (pos) {
|
ScriptsMorph.prototype.edit = function (pos) {
|
||||||
|
var target;
|
||||||
var world = this.world();
|
var world = this.world();
|
||||||
if (this.focus) {this.focus.stopEditing(); }
|
if (this.focus) {this.focus.stopEditing(); }
|
||||||
world.stopEditing();
|
world.stopEditing();
|
||||||
if (!ScriptsMorph.prototype.enableKeyboard) {return; }
|
if (!ScriptsMorph.prototype.enableKeyboard) {return; }
|
||||||
this.focus = new ScriptFocusMorph(this, this, pos);
|
target = this.selectForEdit(); // enable copy-on-edit
|
||||||
this.focus.getFocus(world);
|
target.focus = new ScriptFocusMorph(target, target, pos);
|
||||||
|
target.focus.getFocus(world);
|
||||||
};
|
};
|
||||||
|
|
||||||
// ScriptsMorph context - scripts target
|
// ScriptsMorph context - scripts target
|
||||||
|
|
|
@ -3463,6 +3463,7 @@ Fixes:
|
||||||
------
|
------
|
||||||
* Blocks: shadow inherited scripts on deleting blocks and comments via the context menu
|
* Blocks: shadow inherited scripts on deleting blocks and comments via the context menu
|
||||||
* Blocks: shadow inherited scripts on “clean up”
|
* Blocks: shadow inherited scripts on “clean up”
|
||||||
|
* Blocks, Objects: shadow inherited scripts on keyboard entry
|
||||||
|
|
||||||
|
|
||||||
Features:
|
Features:
|
||||||
|
|
|
@ -82,7 +82,7 @@ SpeechBubbleMorph, RingMorph, isNil, FileReader, TableDialogMorph,
|
||||||
BlockEditorMorph, BlockDialogMorph, PrototypeHatBlockMorph, localize,
|
BlockEditorMorph, BlockDialogMorph, PrototypeHatBlockMorph, localize,
|
||||||
TableMorph, TableFrameMorph, normalizeCanvas, BooleanSlotMorph, HandleMorph*/
|
TableMorph, TableFrameMorph, normalizeCanvas, BooleanSlotMorph, HandleMorph*/
|
||||||
|
|
||||||
modules.objects = '2017-June-22';
|
modules.objects = '2017-June-23';
|
||||||
|
|
||||||
var SpriteMorph;
|
var SpriteMorph;
|
||||||
var StageMorph;
|
var StageMorph;
|
||||||
|
@ -6449,7 +6449,9 @@ StageMorph.prototype.editScripts = function () {
|
||||||
scripts,
|
scripts,
|
||||||
sorted;
|
sorted;
|
||||||
if (ide.isAppMode || !ScriptsMorph.prototype.enableKeyboard) {return; }
|
if (ide.isAppMode || !ScriptsMorph.prototype.enableKeyboard) {return; }
|
||||||
scripts = this.parentThatIsA(IDE_Morph).currentSprite.scripts;
|
scripts = this.parentThatIsA(
|
||||||
|
IDE_Morph
|
||||||
|
).currentSprite.scripts.selectForEdit(); // shadow on edit, if inherited
|
||||||
scripts.edit(scripts.position());
|
scripts.edit(scripts.position());
|
||||||
sorted = scripts.focus.sortedScripts();
|
sorted = scripts.focus.sortedScripts();
|
||||||
if (sorted.length) {
|
if (sorted.length) {
|
||||||
|
|
Ładowanie…
Reference in New Issue