Merge branch '15.06'

* 15.06:
  Update changelog
  Correct the bottom offset we add when setting the volume for scale to max
  Display progress information during processing of layer data
  If findObject returns none but object_id != 0 use the selected object
  Offset the displayed rotation angle so it does not overlap the mouse cursor
  Abort attempts to connect if an error is thrown when connecting to the serial port
  Fix recent files on Windows
  Defer opening the webbrowser until the next run of the event loop
  Disable slicing and platform physics when an operation is being performed
  Rework LayerData mesh generation for improved performance
  Performance: Only calculate the platform center once, not for every poly
  Add application icons for all three platforms
This commit is contained in:
Arjen Hiemstra 2015-06-24 12:06:39 +02:00
commit a429e362ad
16 changed files with 190 additions and 51 deletions

View file

@ -85,7 +85,7 @@ class CuraApplication(QtApplication):
if not os.path.isfile(f):
continue
self._recent_files.append(f)
self._recent_files.append(QUrl.fromLocalFile(f))
## Handle loading of all plugin types (and the backend explicitly)
# \sa PluginRegistery
@ -215,6 +215,9 @@ class CuraApplication(QtApplication):
def deleteObject(self, object_id):
object = self.getController().getScene().findObject(object_id)
if not object and object_id != 0: #Workaround for tool handles overlapping the selected object
object = Selection.getSelectedObject(0)
if object:
op = RemoveSceneNodeOperation(object)
op.push()
@ -224,6 +227,9 @@ class CuraApplication(QtApplication):
def multiplyObject(self, object_id, count):
node = self.getController().getScene().findObject(object_id)
if not node and object_id != 0: #Workaround for tool handles overlapping the selected object
node = Selection.getSelectedObject(0)
if node:
op = GroupedOperation()
for i in range(count):
@ -240,6 +246,9 @@ class CuraApplication(QtApplication):
def centerObject(self, object_id):
node = self.getController().getScene().findObject(object_id)
if not node and object_id != 0: #Workaround for tool handles overlapping the selected object
node = Selection.getSelectedObject(0)
if node:
op = SetTransformOperation(node, Vector())
op.push()
@ -330,7 +339,7 @@ class CuraApplication(QtApplication):
return log
recentFilesChanged = pyqtSignal()
@pyqtProperty("QStringList", notify = recentFilesChanged)
@pyqtProperty("QVariantList", notify = recentFilesChanged)
def recentFiles(self):
return self._recent_files
@ -468,7 +477,9 @@ class CuraApplication(QtApplication):
self._volume.rebuild()
if self.getController().getTool("ScaleTool"):
self.getController().getTool("ScaleTool").setMaximumBounds(self._volume.getBoundingBox())
bbox = self._volume.getBoundingBox()
bbox.setBottom(0.0)
self.getController().getTool("ScaleTool").setMaximumBounds(bbox)
offset = machine.getSettingValueByKey("machine_platform_offset")
if offset:
@ -508,7 +519,7 @@ class CuraApplication(QtApplication):
if type(job) is not ReadMeshJob:
return
f = job.getFileName()
f = QUrl.fromLocalFile(job.getFileName())
if f in self._recent_files:
self._recent_files.remove(f)
@ -516,5 +527,9 @@ class CuraApplication(QtApplication):
if len(self._recent_files) > 10:
del self._recent_files[10]
Preferences.getInstance().setValue("cura/recent_files", ";".join(self._recent_files))
pref = ""
for path in self._recent_files:
pref += path.toLocalFile() + ";"
Preferences.getInstance().setValue("cura/recent_files", pref)
self.recentFilesChanged.emit()