chiark
/
gitweb
/
~ianmdlvl
/
cura.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
41308e2
)
Fix to add initial model file(s) to MRU list
author
smorloc
<smorloc@gmail.com>
Sat, 19 Jan 2013 02:26:02 +0000
(21:26 -0500)
committer
smorloc
<smorloc@gmail.com>
Sat, 19 Jan 2013 02:40:36 +0000
(21:40 -0500)
.gitignore
patch
|
blob
|
history
Cura/gui/mainWindow.py
patch
|
blob
|
history
diff --git
a/.gitignore
b/.gitignore
index 65f3bfa8c2b6f1cf4abb344179e12397524d36d0..989d8494f3d20d69dc23dc80d38c63d15633bbc1 100644
(file)
--- a/
.gitignore
+++ b/
.gitignore
@@
-12,6
+12,7
@@
Printrun
.DS_Store
Cura/current_profile.ini
Cura/preferences.ini
.DS_Store
Cura/current_profile.ini
Cura/preferences.ini
+Cura/mru_filelist.ini
cura.sh
pypy
python
cura.sh
pypy
python
@@
-25,3
+26,5
@@
scripts/darwin/build/*
scripts/darwin/Cura.dmg.sparseimage
scripts/win32/dist/*
log.txt
scripts/darwin/Cura.dmg.sparseimage
scripts/win32/dist/*
log.txt
+output.txt
+*.bak
diff --git
a/Cura/gui/mainWindow.py
b/Cura/gui/mainWindow.py
index 16e61fa3e78540c599114387fc5aa9b9d93c8e7a..1a0d7d1694dc9216dfe44c0a9920b29d1c53636c 100644
(file)
--- a/
Cura/gui/mainWindow.py
+++ b/
Cura/gui/mainWindow.py
@@
-202,6
+202,10
@@
class mainWindow(wx.Frame):
if len(self.filelist) > 0:
self.preview3d.loadModelFiles(self.filelist)
if len(self.filelist) > 0:
self.preview3d.loadModelFiles(self.filelist)
+ # Update the Model MRU
+ for idx in xrange(0, len(self.filelist)):
+ self.addToModelMRU(self.filelist[idx])
+
self.updateProfileToControls()
self.SetBackgroundColour(self.normalSettingsPanel.GetBackgroundColour())
self.updateProfileToControls()
self.SetBackgroundColour(self.normalSettingsPanel.GetBackgroundColour())
@@
-285,12
+289,10
@@
class mainWindow(wx.Frame):
profile.putPreference('lastFile', ';'.join(self.filelist))
self.preview3d.loadModelFiles(self.filelist, True)
self.preview3d.setViewMode("Normal")
profile.putPreference('lastFile', ';'.join(self.filelist))
self.preview3d.loadModelFiles(self.filelist, True)
self.preview3d.setViewMode("Normal")
+
# Update the Model MRU
for idx in xrange(0, len(self.filelist)):
# Update the Model MRU
for idx in xrange(0, len(self.filelist)):
- self.modelFileHistory.AddFileToHistory(self.filelist[idx])
- self.config.SetPath("/ModelMRU")
- self.modelFileHistory.Save(self.config)
- self.config.Flush()
+ self.addToModelMRU(self.filelist[idx])
def OnDropFiles(self, files):
self._loadModels(files)
def OnDropFiles(self, files):
self._loadModels(files)
@@
-349,6
+351,12
@@
class mainWindow(wx.Frame):
filelist = [ path ]
self._loadModels(filelist)
filelist = [ path ]
self._loadModels(filelist)
+ def addToModelMRU(self, file):
+ self.modelFileHistory.AddFileToHistory(file)
+ self.config.SetPath("/ModelMRU")
+ self.modelFileHistory.Save(self.config)
+ self.config.Flush()
+
def OnProfileMRU(self, e):
fileNum = e.GetId() - self.ID_MRU_PROFILE1
path = self.profileFileHistory.GetHistoryFile(fileNum)
def OnProfileMRU(self, e):
fileNum = e.GetId() - self.ID_MRU_PROFILE1
path = self.profileFileHistory.GetHistoryFile(fileNum)
@@
-361,6
+369,12
@@
class mainWindow(wx.Frame):
profile.loadGlobalProfile(path)
self.updateProfileToControls()
profile.loadGlobalProfile(path)
self.updateProfileToControls()
+ def addToProfileMRU(self, file):
+ self.profileFileHistory.AddFileToHistory(file)
+ self.config.SetPath("/ProfileMRU")
+ self.profileFileHistory.Save(self.config)
+ self.config.Flush()
+
def removeSliceProgress(self, spp):
self.progressPanelList.remove(spp)
newSize = self.GetSize()
def removeSliceProgress(self, spp):
self.progressPanelList.remove(spp)
newSize = self.GetSize()
@@
-391,10
+405,7
@@
class mainWindow(wx.Frame):
self.updateProfileToControls()
# Update the Profile MRU
self.updateProfileToControls()
# Update the Profile MRU
- self.profileFileHistory.AddFileToHistory(profileFile)
- self.config.SetPath("/ProfileMRU")
- self.profileFileHistory.Save(self.config)
- self.config.Flush()
+ self.addToProfileMRU(profileFile)
dlg.Destroy()
def OnLoadProfileFromGcode(self, e):
dlg.Destroy()
def OnLoadProfileFromGcode(self, e):