Skip to content

Commit

Permalink
fix #724
Browse files Browse the repository at this point in the history
  • Loading branch information
caver456 committed Dec 29, 2023
1 parent 2de9a1d commit efd4a6b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions radiolog.py
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,9 @@ def __init__(self,parent):
self.teamNotesFileName='team_notes.json'

# 662 added for debugging - copy the operator file into the run dir on startup and on shutdown
shutil.copy(os.path.join(self.configDir,self.operatorsFileName),os.path.join(self.sessionDir,'operators_at_startup.json'))
# (#724: only if the file exists!)
if os.path.isfile(os.path.join(self.configDir,self.operatorsFileName)):
shutil.copy(os.path.join(self.configDir,self.operatorsFileName),os.path.join(self.sessionDir,'operators_at_startup.json'))

# self.operatorsDict: dictionary with one key ('operators') whose value is a list of dictionaries
# Why not just a list of dictionaries? Why wrap in a single-item dictionary?
Expand Down Expand Up @@ -4062,7 +4064,9 @@ def closeEvent(self,event):
win32gui.SystemParametersInfo(win32con.SPI_SETACTIVEWINDOWTRACKING,self.initialWindowTracking)

# 662 added for debugging - copy the operator file into the run dir on startup and on shutdown
shutil.copy(os.path.join(self.configDir,self.operatorsFileName),os.path.join(self.sessionDir,'operators_at_shutdown.json'))
# (#724: only if the file exists!)
if os.path.isfile(os.path.join(self.configDir,self.operatorsFileName)):
shutil.copy(os.path.join(self.configDir,self.operatorsFileName),os.path.join(self.sessionDir,'operators_at_shutdown.json'))

qApp.quit() # needed to make sure all windows area closed

Expand Down

0 comments on commit efd4a6b

Please sign in to comment.