Merge branch '2.1' of https://github.com/Ultimaker/Cura into 2.1

This commit is contained in:
fieldOfView 2016-03-01 17:24:06 +01:00
commit bec897843d
3 changed files with 33 additions and 3 deletions

View File

@ -78,6 +78,8 @@ class CuraApplication(QtApplication):
if not hasattr(sys, "frozen"): if not hasattr(sys, "frozen"):
Resources.addSearchPath(os.path.join(os.path.abspath(os.path.dirname(__file__)), "..")) Resources.addSearchPath(os.path.join(os.path.abspath(os.path.dirname(__file__)), ".."))
self._open_file_queue = [] #Files to open when plug-ins are loaded.
super().__init__(name = "cura", version = CuraVersion) super().__init__(name = "cura", version = CuraVersion)
self.setWindowIcon(QIcon(Resources.getPath(Resources.Images, "cura-icon.png"))) self.setWindowIcon(QIcon(Resources.getPath(Resources.Images, "cura-icon.png")))
@ -148,6 +150,8 @@ class CuraApplication(QtApplication):
if self.getBackend() == None: if self.getBackend() == None:
raise RuntimeError("Could not load the backend plugin!") raise RuntimeError("Could not load the backend plugin!")
self._plugins_loaded = True
def addCommandLineOptions(self, parser): def addCommandLineOptions(self, parser):
super().addCommandLineOptions(parser) super().addCommandLineOptions(parser)
parser.add_argument("file", nargs="*", help="Files to load after starting the application.") parser.add_argument("file", nargs="*", help="Files to load after starting the application.")
@ -205,13 +209,18 @@ class CuraApplication(QtApplication):
for file in self.getCommandLineOption("file", []): for file in self.getCommandLineOption("file", []):
self._openFile(file) self._openFile(file)
for file_name in self._open_file_queue: #Open all the files that were queued up while plug-ins were loading.
self._openFile(file_name)
self.exec_() self.exec_()
# Handle Qt events # Handle Qt events
def event(self, event): def event(self, event):
if event.type() == QEvent.FileOpen: if event.type() == QEvent.FileOpen:
self._openFile(event.file()) if self._plugins_loaded:
self._openFile(event.file())
else:
self._open_file_queue.append(event.file())
return super().event(event) return super().event(event)

View File

@ -1305,7 +1305,7 @@
"description": "Experimental feature: Make support areas smaller at the bottom than at the overhang.", "description": "Experimental feature: Make support areas smaller at the bottom than at the overhang.",
"type": "boolean", "type": "boolean",
"default": false, "default": false,
"visible": false, "visible": true,
"enabled": "support_enable" "enabled": "support_enable"
}, },
"support_conical_angle": { "support_conical_angle": {

View File

@ -15,6 +15,27 @@
"machine_depth": { "default": 225 }, "machine_depth": { "default": 225 },
"machine_height": { "default": 200 }, "machine_height": { "default": 200 },
"machine_show_variants": { "default": true }, "machine_show_variants": { "default": true },
"gantry_height": { "default": 50 } "gantry_height": { "default": 50 },
"machine_head_with_fans_polygon":
{
"default": [
[
-44,
14
],
[
-44,
-34
],
[
64,
14
],
[
64,
-34
]
]
}
} }
} }