Skip to content

Commit

Permalink
fix saving of locations and provide default filename for intensities
Browse files Browse the repository at this point in the history
  • Loading branch information
andim committed Jun 19, 2017
1 parent ce735ed commit 55b6de3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions source/easyleed/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,10 @@ def setImage(self, image):
self.current_energy = energy

def saveIntensity(self):
filename = qt_filedialog_convert_to_str(QFileDialog.getSaveFileName(self, "Save intensities to a file"))
filename = 'intensities.csv'
filename = qt_filedialog_convert_to_str(QFileDialog.getSaveFileName(self,
"Save intensities to a file",
filename))
if filename:
self.worker.saveIntensity(filename)

Expand Down Expand Up @@ -1133,12 +1136,12 @@ def fileQuit(self):
self.plotwid.canvas.close()

def saveSpots(self):
"""Saves the spot locations to a file, uses workers saveloc-function"""
"""Saves the spot locations to a file, uses workers saveLoc-function"""
filename = "loc_" + str(self.initial_energy) + "eV.csv"
filename = qt_filedialog_convert_to_str(QFileDialog.getSaveFileName(self,
"Save the spot locations to a file", filename))
if filename:
self.worker.saveloc(filename)
self.worker.saveLoc(filename)

def loadSpots(self):
"""Load saved spot positions"""
Expand Down

0 comments on commit 55b6de3

Please sign in to comment.