Skip to content

Commit c493cb3

Browse files
committed
Remove vex.closeAll(), force focus to vex input
1 parent 0579dcb commit c493cb3

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

src/renderer/components/App.jsx

-3
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,9 @@ const App = ({helmetUIVersion, versions, searchEMMEPython}) => {
110110
if (found) {
111111
if (confirm(`Python ${versions.emme_python} löytyi sijainnista:\n\n${pythonPath}\n\nHaluatko käyttää tätä sijaintia?`)) {
112112
globalSettingsStore.current.set('emme_python_path', pythonPath);
113-
vex.closeAll()
114113
}
115114
} else {
116115
alert(`Emme ${versions.emme_system} ja Python ${versions.emme_python} eivät löytyneet oletetusta sijainnista.\n\nMääritä Pythonin sijainti Asetukset-dialogissa.`);
117-
vex.closeAll()
118116
}
119117
}
120118
// Copy existing global store values to state. Remember: state updates async so refer to existing.
@@ -138,7 +136,6 @@ const App = ({helmetUIVersion, versions, searchEMMEPython}) => {
138136
if (!fs.existsSync(existingProjectPath)) {
139137
alert(`Projektikansiota ei löydy polusta '${existingProjectPath}'.\nProjektikansioksi asetetaan kotikansio '${homedir}'.`)
140138
_setProjectPath(homedir);
141-
vex.closeAll();
142139
}
143140

144141
// If HELMET Scripts is the initial (un-set), download latest version and use that. Remember: state updates async so refer to existing.

src/renderer/components/HelmetProject/HelmetProject.jsx

+2-8
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ const HelmetProject = ({
7878
}
7979
}
8080
});
81+
document.getElementsByName("vex")[0].focus();
8182
};
8283
promptCreation();
8384
};
@@ -212,7 +213,7 @@ const HelmetProject = ({
212213
setOpenScenarioID(null);
213214
setScenarios(scenarios.filter((s) => s.id !== scenario.id));
214215
fs.unlinkSync(path.join(projectPath, `${scenario.name}.json`));
215-
vex.closeAll();
216+
216217
// window.location.reload(); // Vex-js dialog input gets stuck otherwise
217218
}
218219
};
@@ -233,27 +234,22 @@ const HelmetProject = ({
233234
// Check required global parameters are set
234235
if (!emmePythonPath) {
235236
alert("Python -sijaintia ei ole asetettu!");
236-
vex.closeAll();
237237
return;
238238
}
239239
if (!helmetScriptsPath) {
240240
alert("Helmet Scripts -kansiota ei ole asetettu, tarkista Asetukset.");
241-
vex.closeAll();
242241
return;
243242
}
244243
if (!projectPath) {
245244
alert("Projektin kotikansiota ei ole asetettu, tarkista Asetukset.");
246-
vex.closeAll();
247245
return;
248246
}
249247
if (!basedataPath) {
250248
alert("L\u00E4ht\u00F6datan kansiota ei ole asetettu, tarkista Asetukset.");
251-
vex.closeAll();
252249
return;
253250
}
254251
if (!resultsPath) {
255252
alert("Tulosdatan kansiota ei ole asetettu, tarkista Asetukset.");
256-
vex.closeAll();
257253
return;
258254
}
259255

@@ -275,8 +271,6 @@ const HelmetProject = ({
275271
}
276272
}
277273

278-
vex.closeAll();
279-
280274
// Perform UI changes to indicate "initializing run of active scenarios"
281275
setOpenScenarioID(null); // Close any open scenario configuration
282276
setLogContents([

0 commit comments

Comments
 (0)