Skip to content

Commit 5a47e7a

Browse files
committed
Keep platform-specifics ui-side
1 parent be15f7e commit 5a47e7a

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

tools/Python/mccodelib/utils.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -919,9 +919,6 @@ def call_if_not_none(fct, *args):
919919
if fct:
920920
fct(*args)
921921

922-
if os.name == 'nt':
923-
cmd = 'start ' + cmd
924-
925922
if not cwd:
926923
cwd = os.getcwd()
927924

tools/Python/mcgui/mcgui.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,11 @@ def handleMcDisplayWeb(self):
743743
DISPLAY="mxdisplay"
744744
self.emitter.status('Running ' + DISPLAY + '-webgl-classic...')
745745
try:
746-
cmd = DISPLAY+'-webgl-classic -y -n100 ' + os.path.basename(self.state.getInstrumentFile()) + '&'
746+
cmd = DISPLAY+'-webgl-classic -y -n100 ' + os.path.basename(self.state.getInstrumentFile())
747+
if os.name == 'nt':
748+
cmd = 'start ' + cmd
749+
else:
750+
cmd = cmd + ' &'
747751
self.emitter.message(cmd, gui=True)
748752
self.emitter.message('', gui=True)
749753

@@ -760,7 +764,11 @@ def handleMcDisplay2D(self):
760764
DISPLAY="mxdisplay"
761765
self.emitter.status('Running ' + DISPLAY + '-pyqtgraph...')
762766
try:
763-
cmd = DISPLAY+'-pyqtgraph --default -n100 ' + os.path.basename(self.state.getInstrumentFile()) + '&'
767+
cmd = DISPLAY+'-pyqtgraph --default -n100 ' + os.path.basename(self.state.getInstrumentFile())
768+
if os.name == 'nt':
769+
cmd = 'start ' + cmd
770+
else:
771+
cmd = cmd + ' &'
764772
self.emitter.message(cmd, gui=True)
765773
self.emitter.message('', gui=True)
766774

0 commit comments

Comments
 (0)