mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-13 06:43:15 +08:00
Merge branch '15.06'
Conflicts: cura/CuraApplication.py
This commit is contained in:
commit
38346dd95f
21
CHANGES
21
CHANGES
@ -7,6 +7,24 @@ Cura 15.06 is a new release built from the ground up on a completely new
|
||||
framework called Uranium. This framework has been designed to make it easier to
|
||||
extend Cura with additional functionality as well as provide a cleaner UI.
|
||||
|
||||
Changes since 15.05.93
|
||||
----------------------
|
||||
|
||||
* Fixed: No shortcuts for moving up/down layers in layer view.
|
||||
* Fixed: Last view layers could not be scrolled through in layer view.
|
||||
* Fixed: Files provided on command line would not actually show up on the build
|
||||
platform.
|
||||
* Fixed: Render a ghost of the selection in Layer view to make the actual object
|
||||
position clear.
|
||||
* Fixed: Showing a menu would clear the selection.
|
||||
* Fixed: Size and scaling factor display for scale tool.
|
||||
* Fixed: Missing background for additional tool controls.
|
||||
* Fixed: Loading message times out when loading large files.
|
||||
* Fixed: Show recent files in the file menu.
|
||||
* Fixed: Windows installer will now install MSVC 2010 redistributable, to
|
||||
prevent issues with missing DLL's.
|
||||
* Fixed: Collapsed/expanded state of setting categories not stored.
|
||||
|
||||
Changes since 15.05.91
|
||||
----------------------
|
||||
|
||||
@ -26,7 +44,8 @@ Changes since 15.05.91
|
||||
* Fixed: Camera panning now works correctly instead of doing nothing.
|
||||
* Fixed: Camera would flip around center point at maximum rotation.
|
||||
* Fixed: Build platform grid blocked view from below objects.
|
||||
* Fixed: Viewport on MacOSX with high-DPI screens was only taking 1/4th of the window
|
||||
* Fixed: Viewport on MacOSX with high-DPI screens was only taking 1/4th of the
|
||||
window
|
||||
|
||||
Changes since 15.05.90
|
||||
----------------------
|
||||
|
@ -17,6 +17,7 @@ from UM.Logger import Logger
|
||||
from UM.Preferences import Preferences
|
||||
from UM.Message import Message
|
||||
from UM.PluginRegistry import PluginRegistry
|
||||
from UM.JobQueue import JobQueue
|
||||
|
||||
from UM.Scene.BoxRenderer import BoxRenderer
|
||||
from UM.Scene.Selection import Selection
|
||||
@ -71,6 +72,18 @@ class CuraApplication(QtApplication):
|
||||
|
||||
Preferences.getInstance().addPreference("cura/active_machine", "")
|
||||
Preferences.getInstance().addPreference("cura/active_mode", "simple")
|
||||
Preferences.getInstance().addPreference("cura/recent_files", "")
|
||||
Preferences.getInstance().addPreference("cura/categories_expanded", "")
|
||||
|
||||
JobQueue.getInstance().jobFinished.connect(self._onJobFinished)
|
||||
|
||||
self._recent_files = []
|
||||
files = Preferences.getInstance().getValue("cura/recent_files").split(";")
|
||||
for f in files:
|
||||
if not os.path.isfile(f):
|
||||
continue
|
||||
|
||||
self._recent_files.append(f)
|
||||
|
||||
## Handle loading of all plugin types (and the backend explicitly)
|
||||
# \sa PluginRegistery
|
||||
@ -305,6 +318,25 @@ class CuraApplication(QtApplication):
|
||||
|
||||
return log
|
||||
|
||||
recentFilesChanged = pyqtSignal()
|
||||
@pyqtProperty("QStringList", notify = recentFilesChanged)
|
||||
def recentFiles(self):
|
||||
return self._recent_files
|
||||
|
||||
@pyqtSlot("QStringList")
|
||||
def setExpandedCategories(self, categories):
|
||||
categories = list(set(categories))
|
||||
categories.sort()
|
||||
joined = ";".join(categories)
|
||||
if joined != Preferences.getInstance().getValue("cura/categories_expanded"):
|
||||
Preferences.getInstance().setValue("cura/categories_expanded", joined)
|
||||
self.expandedCategoriesChanged.emit()
|
||||
|
||||
expandedCategoriesChanged = pyqtSignal()
|
||||
@pyqtProperty("QStringList", notify = expandedCategoriesChanged)
|
||||
def expandedCategories(self):
|
||||
return Preferences.getInstance().getValue("cura/categories_expanded").split(";")
|
||||
|
||||
outputDevicesChanged = pyqtSignal()
|
||||
|
||||
@pyqtProperty("QVariantMap", notify = outputDevicesChanged)
|
||||
@ -460,3 +492,18 @@ class CuraApplication(QtApplication):
|
||||
|
||||
op = AddSceneNodeOperation(node, self.getController().getScene().getRoot())
|
||||
op.push()
|
||||
|
||||
def _onJobFinished(self, job):
|
||||
if type(job) is not ReadMeshJob:
|
||||
return
|
||||
|
||||
f = job.getFileName()
|
||||
if f in self._recent_files:
|
||||
self._recent_files.remove(f)
|
||||
|
||||
self._recent_files.insert(0, f)
|
||||
if len(self._recent_files) > 10:
|
||||
del self._recent_files[10]
|
||||
|
||||
Preferences.getInstance().setValue("cura/recent_files", ";".join(self._recent_files))
|
||||
self.recentFilesChanged.emit()
|
||||
|
@ -99,6 +99,15 @@ Function LaunchLink
|
||||
Exec '"$WINDIR\explorer.exe" "$SMPROGRAMS\Cura ${VERSION}\Cura ${VERSION}.lnk"'
|
||||
FunctionEnd
|
||||
|
||||
Section "Install Visual Studio 2010 Redistributable"
|
||||
SetOutPath "$INSTDIR"
|
||||
File "vcredist_2010_x86.exe"
|
||||
|
||||
IfSilent +2
|
||||
ExecWait '"$INSTDIR\vcredist_2010_x86.exe"'
|
||||
|
||||
SectionEnd
|
||||
|
||||
;Section "Install Arduino Drivers"
|
||||
; ; Set output path to the driver directory.
|
||||
; SetOutPath "$INSTDIR\drivers\"
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Window 2.1
|
||||
|
||||
import UM 1.0 as UM
|
||||
@ -12,48 +11,53 @@ UM.Dialog {
|
||||
id: base
|
||||
|
||||
//: About dialog title
|
||||
title: qsTr("About Cura");
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent;
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true;
|
||||
Layout.fillHeight: true;
|
||||
}
|
||||
title: qsTr("About Cura")
|
||||
minimumWidth: 400
|
||||
minimumHeight: 300
|
||||
|
||||
Image {
|
||||
Layout.alignment: Qt.AlignHCenter;
|
||||
Layout.preferredWidth: parent.width * 0.75;
|
||||
Layout.preferredHeight: width * (1/4.25);
|
||||
id: logo
|
||||
width: parent.width * 0.75
|
||||
height: width * (1/4.25)
|
||||
|
||||
source: UM.Theme.images.logo;
|
||||
source: UM.Theme.images.logo
|
||||
|
||||
sourceSize.width: width;
|
||||
sourceSize.height: height;
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
anchors.centerIn: parent
|
||||
anchors.verticalCenterOffset : -(height * 0.5)
|
||||
}
|
||||
|
||||
Label {
|
||||
Layout.alignment: Qt.AlignHCenter;
|
||||
id: version
|
||||
|
||||
text: "Cura 15.06 Beta";
|
||||
font: UM.Theme.fonts.large;
|
||||
text: "Cura 15.06 Beta"
|
||||
font: UM.Theme.fonts.large
|
||||
anchors.horizontalCenter : logo.horizontalCenter
|
||||
anchors.horizontalCenterOffset : (logo.width * 0.25)
|
||||
anchors.top: logo.bottom
|
||||
anchors.topMargin : 5
|
||||
}
|
||||
|
||||
Label {
|
||||
id: description
|
||||
width: parent.width
|
||||
|
||||
//: About dialog application description
|
||||
text: qsTr("End-to-end solution for fused filament 3D printing.")
|
||||
wrapMode: Text.WordWrap
|
||||
anchors.top: version.bottom
|
||||
anchors.topMargin : 10
|
||||
}
|
||||
|
||||
Label {
|
||||
id: author_note
|
||||
width: parent.width
|
||||
|
||||
//: About dialog application author note
|
||||
text: qsTr("Cura has been developed by Ultimaker B.V. in cooperation with the community.")
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true;
|
||||
Layout.fillHeight: true;
|
||||
}
|
||||
wrapMode: Text.WordWrap
|
||||
anchors.top: description.bottom
|
||||
}
|
||||
|
||||
rightButtons: Button {
|
||||
|
@ -25,6 +25,7 @@ UM.MainWindow {
|
||||
window: base
|
||||
|
||||
Menu {
|
||||
id: fileMenu
|
||||
//: File menu
|
||||
title: qsTr("&File");
|
||||
|
||||
@ -33,6 +34,19 @@ UM.MainWindow {
|
||||
|
||||
MenuSeparator { }
|
||||
|
||||
Instantiator {
|
||||
model: Printer.recentFiles
|
||||
MenuItem {
|
||||
property url filePath: modelData;
|
||||
text: (index + 1) + ". " + modelData.slice(modelData.lastIndexOf("/") + 1);
|
||||
onTriggered: UM.MeshFileHandler.readLocalFile(filePath);
|
||||
}
|
||||
onObjectAdded: fileMenu.insertItem(index, object)
|
||||
onObjectRemoved: fileMenu.removeItem(object)
|
||||
}
|
||||
|
||||
MenuSeparator { }
|
||||
|
||||
MenuItem { action: actions.quit; }
|
||||
}
|
||||
|
||||
@ -178,7 +192,7 @@ UM.MainWindow {
|
||||
id: openFileButton;
|
||||
|
||||
iconSource: UM.Theme.icons.open;
|
||||
style: UM.Theme.styles.tool_button;
|
||||
style: UM.Backend.progress < 0 ? UM.Theme.styles.open_file_button : UM.Theme.styles.tool_button;
|
||||
|
||||
anchors {
|
||||
top: parent.top;
|
||||
@ -419,3 +433,4 @@ UM.MainWindow {
|
||||
|
||||
Component.onCompleted: UM.Theme.load(UM.Resources.getPath(UM.Resources.ThemesLocation, "cura"))
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,13 @@
|
||||
// Copyright (c) 2015 Ultimaker B.V.
|
||||
// Cura is released under the terms of the AGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.0
|
||||
|
||||
import QtQuick.Controls 1.2
|
||||
|
||||
import UM 1.0 as UM
|
||||
|
||||
UM.SettingView { }
|
||||
UM.SettingView {
|
||||
expandedCategories: Printer.expandedCategories;
|
||||
onExpandedCategoriesChanged: Printer.setExpandedCategories(expandedCategories);
|
||||
}
|
||||
|
@ -35,6 +35,55 @@ QtObject {
|
||||
}
|
||||
}
|
||||
|
||||
property Component open_file_button: Component {
|
||||
ButtonStyle {
|
||||
background: UM.AngledCornerRectangle {
|
||||
implicitWidth: UM.Theme.sizes.button.width;
|
||||
implicitHeight: UM.Theme.sizes.button.height;
|
||||
color: {
|
||||
if(control.hovered) {
|
||||
return UM.Theme.colors.button_active_hover;
|
||||
} else {
|
||||
return UM.Theme.colors.button_active;
|
||||
}
|
||||
}
|
||||
Behavior on color { ColorAnimation { duration: 50; } }
|
||||
cornerSize: UM.Theme.sizes.default_margin.width;
|
||||
|
||||
Rectangle {
|
||||
anchors.bottom: parent.top;
|
||||
|
||||
width: parent.width;
|
||||
height: control.hovered ? label.height : 0;
|
||||
Behavior on height { NumberAnimation { duration: 75; } }
|
||||
|
||||
opacity: control.hovered ? 1.0 : 0.0;
|
||||
Behavior on opacity { NumberAnimation { duration: 75; } }
|
||||
|
||||
Label {
|
||||
id: label
|
||||
anchors.horizontalCenter: parent.horizontalCenter;
|
||||
text: control.text;
|
||||
font: UM.Theme.fonts.button_tooltip;
|
||||
color: UM.Theme.colors.button_tooltip_text;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
label: Item {
|
||||
Image {
|
||||
anchors.centerIn: parent;
|
||||
|
||||
source: control.iconSource;
|
||||
width: UM.Theme.sizes.button_icon.width;
|
||||
height: UM.Theme.sizes.button_icon.height;
|
||||
|
||||
sourceSize: UM.Theme.sizes.button_icon;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
property Component tool_button: Component {
|
||||
ButtonStyle {
|
||||
background: UM.AngledCornerRectangle {
|
||||
|
Loading…
x
Reference in New Issue
Block a user