Skip to content

Commit 53f4e13

Browse files
Reverted change disabling modal dialogs. For #1747
1 parent 66d8a0d commit 53f4e13

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

doc/minsky.pdf

10 Bytes
Binary file not shown.

gui-js/apps/minsky-electron/src/app/managers/WindowManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ export class WindowManager {
184184
useContentSize: true,
185185
minimizable: false,
186186
show: false,
187-
parent: null /* modal ? mainWindow : null */, // Having a parent hides control on MacOS
187+
parent: modal ? this.getMainWindow() : null,
188188
modal,
189189
backgroundColor,
190190
alwaysOnTop,

gui-js/libs/menu/src/lib/insert/create-variable/create-variable.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ export class CreateVariableComponent implements OnInit, OnDestroy {
136136
async updateFormValues() {
137137
let item=new VariableBase(this.electronService.minsky.canvas.item);
138138
const local = await item.local();
139+
// check there is an item of the right type
140+
if (typeof local==='object') this.closeWindow();
139141
const init = await item.init();
140142
const units = await item.unitsStr();
141143
const rotation = await item.rotation();

0 commit comments

Comments
 (0)