Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornickthetait <tait@alephobjects.com>2015-06-03 18:04:15 +0300
committernickthetait <tait@alephobjects.com>2015-06-03 18:04:15 +0300
commitd898eaea334c125dbfe8477d5c60527d98b5630c (patch)
treeb48b4e49727d3595e2aecab1ca9897e84a8f9fe0
parent8a73ed49de028b3984d192d66158e452c00903e6 (diff)
parent06e15e08b6c9197ea2547dc2af774586643d5ec9 (diff)
Merge branch 'version-upgrade' into LulzBot-devel
-rw-r--r--Cura/gui/app.py1
-rw-r--r--Cura/gui/simpleMode.py8
-rw-r--r--Cura/util/profile.py21
3 files changed, 22 insertions, 8 deletions
diff --git a/Cura/gui/app.py b/Cura/gui/app.py
index 536ba1ec6d..8f4fb00346 100644
--- a/Cura/gui/app.py
+++ b/Cura/gui/app.py
@@ -159,6 +159,7 @@ class CuraApp(wx.App):
self.mainWindow.OnDropFiles(self.loadFiles)
if profile.getPreference('last_run_version') != version.getVersion(False):
profile.putPreference('last_run_version', version.getVersion(False))
+ profile.performVersionUpgrade()
#newVersionDialog.newVersionDialog().Show()
setFullScreenCapable(self.mainWindow)
diff --git a/Cura/gui/simpleMode.py b/Cura/gui/simpleMode.py
index 4efe511128..d1efb6a17f 100644
--- a/Cura/gui/simpleMode.py
+++ b/Cura/gui/simpleMode.py
@@ -18,14 +18,6 @@ class simpleModePanel(wx.Panel):
self._print_material_options = []
self._print_other_options = []
- # This is a hack around an issue where the machine type in the wizard
- # changed and causes some people to have it set to lulzbot_TAZ and some
- # people have it set to lulzbot_TAZ_4.
- # To avoid duplicating the custom settings overrides, we just change the
- # machine_type instead.
- if profile.getMachineSetting('machine_type') == 'lulzbot_TAZ':
- profile.putMachineSetting('machine_type', 'lulzbot_TAZ_4')
-
printTypePanel = wx.Panel(self)
for filename in resources.getSimpleModeProfiles():
cp = configparser.ConfigParser()
diff --git a/Cura/util/profile.py b/Cura/util/profile.py
index 43d54e9b8a..9d5e494d6b 100644
--- a/Cura/util/profile.py
+++ b/Cura/util/profile.py
@@ -1352,3 +1352,24 @@ def getAlterationFileContents(filename, extruderCount = 1):
#Append the profile string to the end of the GCode, so we can load it from the GCode file later.
#postfix = ';CURA_PROFILE_STRING:%s\n' % (getProfileString())
return unicode(prefix + re.sub("(.)\{([^\}]*)\}", replaceTagMatch, alterationContents).rstrip() + '\n' + postfix).strip().encode('utf-8') + '\n'
+
+def performVersionUpgrade():
+ for n in xrange(0, getMachineCount()):
+ # This is a hack around an issue where the machine type in the wizard
+ # changed and causes some people to have it set to lulzbot_TAZ and some
+ # people have it set to lulzbot_TAZ_4.
+ if getMachineSetting('machine_type', n) == 'lulzbot_TAZ':
+ putMachineSetting('machine_type', 'lulzbot_TAZ_4', n)
+
+ # Upgrade gantry settings for Lulzbot Mini if untouched by user
+ if getMachineSetting('machine_type', n) == 'lulzbot_mini' and \
+ getMachineSetting('extruder_head_size_min_x', n) == '0.0' and \
+ getMachineSetting('extruder_head_size_max_x', n) == '0.0' and \
+ getMachineSetting('extruder_head_size_min_y', n) == '0.0' and \
+ getMachineSetting('extruder_head_size_max_y', n) == '0.0' and \
+ getMachineSetting('extruder_head_size_height', n) == '0.0':
+ putMachineSetting('extruder_head_size_min_x', '40', n)
+ putMachineSetting('extruder_head_size_max_x', '75', n)
+ putMachineSetting('extruder_head_size_min_y', '25', n)
+ putMachineSetting('extruder_head_size_max_y', '55', n)
+ putMachineSetting('extruder_head_size_height', '17', n)