Skip to content

Commit 2efbd24

Browse files
committed
got stuff working a weeeee bit better
1 parent e04d59e commit 2efbd24

2 files changed

Lines changed: 6 additions & 11 deletions

File tree

‎v5-unity/js/opt-frontend-common.ts‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -388,12 +388,6 @@ export abstract class AbstractBaseFrontend {
388388
}
389389
*/
390390

391-
// if you're in display mode, kick back into edit mode before
392-
// executing or else the display might not refresh properly ... ugh
393-
// krufty FIXME
394-
// NB: let's nix this and see if things still work :)
395-
//this.enterEditMode();
396-
397391
this.clearFrontendError();
398392
this.startExecutingCode();
399393

‎v5-unity/js/opt-frontend.ts‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,12 @@ class OptFrontend extends AbstractBaseFrontend {
411411
}
412412

413413
executeCode(forceStartingInstr=0, forceRawInputLst=undefined) {
414+
// if you're in display mode, kick back into edit mode before executing
415+
// or else the display might not refresh properly ... ugh krufty
416+
if (this.appMode != 'edit') {
417+
this.enterEditMode();
418+
}
419+
414420
if (forceRawInputLst !== undefined && forceRawInputLst !== null) {
415421
this.rawInputLst = forceRawInputLst;
416422
}
@@ -784,11 +790,6 @@ class OptFrontend extends AbstractBaseFrontend {
784790
this.loadTestCases(queryStrOptions.testCasesLst);
785791
}
786792

787-
// ugh tricky -- always start in edit mode by default, and then
788-
// switch to display mode only after the code successfully executes
789-
// TODO: nix this and see if things still work
790-
//this.appMode = 'edit';
791-
792793
if ((queryStrOptions.appMode == 'display' ||
793794
queryStrOptions.appMode == 'visualize' /* deprecated */) &&
794795
queryStrOptions.preseededCode /* jump to 'display' mode only with preseeded code */) {

0 commit comments

Comments
 (0)