mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-06 05:48:04 +08:00
Load GCode file after slicing if we still have the same model loaded
This commit is contained in:
parent
7659bfe1a5
commit
c9bd9940c1
@ -102,8 +102,13 @@ class previewPanel(wx.Panel):
|
||||
self.gcodeFilename = filename[: filename.rfind('.')] + "_export.gcode"
|
||||
self.logFilename = filename[: filename.rfind('.')] + "_export.log"
|
||||
#Do the STL file loading in a background thread so we don't block the UI.
|
||||
thread = threading.Thread(target=self.doFileLoad)
|
||||
thread.start()
|
||||
threading.Thread(target=self.doFileLoad).start()
|
||||
|
||||
def loadReModelFile(self, filename):
|
||||
#Only load this again if the filename matches the file we have already loaded (for auto loading GCode after slicing)
|
||||
if self.modelFilename != filename:
|
||||
return
|
||||
threading.Thread(target=self.doFileLoad).start()
|
||||
|
||||
def doFileLoad(self):
|
||||
if os.path.isfile(self.modelFilename) and self.modelFileTime != os.stat(self.modelFilename).st_mtime:
|
||||
|
@ -91,6 +91,7 @@ class sliceProgessPanel(wx.Panel):
|
||||
self.sizer.Layout()
|
||||
self.Layout()
|
||||
self.abort = True
|
||||
self.mainWindow.preview3d.loadReModelFile(self.filename)
|
||||
|
||||
def SetProgress(self, stepName, layer, maxLayer):
|
||||
if self.prevStep != stepName:
|
||||
|
Loading…
x
Reference in New Issue
Block a user