@@ -3899,12 +3899,11 @@ def reset(self,redraw=True,soundOn=True,sampling=False,keepProperties=False):
3899
3899
aw.qmc.dutycycleTX = 0.
3900
3900
aw.qmc.currentpidsv = 0.
3901
3901
3902
- # if there is already some data recorded, we remove the filename to force writing a new file
3902
+ # we remove the filename to force writing a new file
3903
3903
# and avoid accidential overwriting of existing data
3904
- if len(self.timex) > 2:
3905
- #current file name
3906
- aw.curFile = None
3907
- aw.setWindowTitle(aw.windowTitle)
3904
+ #current file name
3905
+ aw.curFile = None
3906
+ aw.setWindowTitle(aw.windowTitle)
3908
3907
3909
3908
# if on turn mouse crosslines off
3910
3909
if aw.qmc.crossmarker:
@@ -17989,7 +17988,8 @@ def setProfile(self,filename,profile,quiet=False):
17989
17988
if "roastUUID" in profile:
17990
17989
self.qmc.roastUUID = d(profile["roastUUID"])
17991
17990
else:
17992
- self.qmc.roastUUID = None
17991
+ self.qmc.roastUUID = uuid.uuid4().hex # generate UUID
17992
+ self.qmc.safesaveflag = True
17993
17993
if "roastbatchnr" in profile:
17994
17994
try:
17995
17995
self.qmc.roastbatchnr = int(profile["roastbatchnr"])
@@ -18197,6 +18197,7 @@ def setProfile(self,filename,profile,quiet=False):
18197
18197
# we don't report errors on settingsLoad
18198
18198
_, _, exc_tb = sys.exc_info()
18199
18199
QMessageBox.information(aw,QApplication.translate("Error Message", "Exception:",None) + " setProfile()",str(ex) + "@line " + str(exc_tb.tb_lineno))
18200
+ return False
18200
18201
18201
18202
# the int n specifies the number of digits
18202
18203
def float2float(self,f,n=1):
@@ -30289,7 +30290,8 @@ def accept(self):
30289
30290
if aw.plus_account is None and aw.qmc.plus_blend is not None and self.org_beans != aw.qmc.beans:
30290
30291
aw.qmc.plus_blend = None
30291
30292
30292
- aw.sendmessage(QApplication.translate("Message","Roast properties updated but profile not saved to disk", None))
30293
+ if not aw.qmc.flagon:
30294
+ aw.sendmessage(QApplication.translate("Message","Roast properties updated but profile not saved to disk", None))
30293
30295
aw.qmc.redraw(recomputeAllDeltas=False)
30294
30296
self.close()
30295
30297
0 commit comments