Skip to content

Commit

Permalink
- reset canvas color to default on loading machine setups with color …
Browse files Browse the repository at this point in the history
…entries

- updates to MPL v3.2.2
- ensures that extra autosave artefacts are save in the extra autosave path if specified (Issue #480)
  • Loading branch information
MAKOMO committed Jun 18, 2020
1 parent 0fbe809 commit 2eaf1f4
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 11 deletions.
26 changes: 18 additions & 8 deletions src/artisanlib/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -25046,18 +25046,27 @@ def fileSave(self,fname,copy=False):
self.qmc.fileClean()

if self.qmc.autosaveimage:
if ".alog" in filename:
filename = filename[0:-5]
#
if QFileInfo(filename).suffix() == "alog":
name_also = QFileInfo(filename).baseName()
else:
name_also = QFileInfo(filename).fileName()
path_also = QDir()
if self.qmc.autosavealsopath != "":
path_also.setPath(self.qmc.autosavealsopath)
else:
path_also.setPath(QFileInfo(filename).path())
filename_also = path_also.absoluteFilePath(name_also)
if self.qmc.autosaveimageformat == "PDF":
self.saveVectorGraph(extension=".pdf",fname=filename)
self.saveVectorGraph(extension=".pdf",fname=filename_also)
elif self.qmc.autosaveimageformat == "SVG":
self.saveVectorGraph(extension=".svg",fname=filename)
self.saveVectorGraph(extension=".svg",fname=filename_also)
elif self.qmc.autosaveimageformat == "CSV":
self.exportCSV(filename + ".csv")
self.exportCSV(filename_also + ".csv")
elif self.qmc.autosaveimageformat == "JSON":
self.exportJSON(filename + ".json")
self.exportJSON(filename_also + ".json")
else:
self.resizeImg(0,1,self.qmc.autosaveimageformat,fname=filename)
self.resizeImg(0,1,self.qmc.autosaveimageformat,fname=filename_also)
return True
else:
self.sendmessage(QApplication.translate("Message","Cancelled", None))
Expand Down Expand Up @@ -25704,7 +25713,8 @@ def settingsLoad(self, filename=None, theme=False):
self.qmc.extra_event_sampling_delay = toInt(settings.value("ExtraEventSamplingDelay",int(self.qmc.extra_event_sampling_delay)))
#restore colors
if settings.contains("Colors"):
self.qmc.palette["canvas"] = 'None' #revert the canvas element to default if it does not exist in the settings.
# self.qmc.palette["canvas"] = 'None' #revert the canvas element to default if it does not exist in the settings.
self.qmc.palette["canvas"] = '#F8F8F8' #revert the canvas element to default if it does not exist in the settings.
for (k, v) in list(toMap(settings.value("Colors")).items()):
self.qmc.palette[str(k)] = s2a(toString(v))
if "messages" in self.qmc.palette:
Expand Down
2 changes: 1 addition & 1 deletion src/requirements-linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ gevent-websocket==0.10.1
numpy==1.18.4
colorspacious==1.1.2
scipy==1.4.1 # 1.3.1
matplotlib==3.2.1
matplotlib==3.2.2
PyQt5==5.15.0 #5.14.2
openpyxl==3.0.3
pyinstaller==3.6
Expand Down
2 changes: 1 addition & 1 deletion src/requirements-osx.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ gevent-websocket==0.10.1
numpy==1.18.4 # 1.16.2 fails on TravisCI; py2app fails with 1.16.5, 1.17.0-2
colorspacious==1.1.2
scipy==1.4.1
matplotlib==3.2.1
matplotlib==3.2.2
PyQt5==5.15.0 #5.14.2
openpyxl==3.0.3
keyring==19.2.0 # builds with 19.3.0 and 20.0.0 fail with py2app/pyinstaller
Expand Down
2 changes: 1 addition & 1 deletion src/requirements-win.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ gevent-websocket==0.10.1
numpy==1.18.4
colorspacious==1.1.2
scipy==1.4.1
matplotlib==3.2.1
matplotlib==3.2.2
PyQt5==5.15.0
openpyxl==3.0.3
pyinstaller==3.6
Expand Down

0 comments on commit 2eaf1f4

Please sign in to comment.