mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 15:07:28 -06:00
Do not show the "load project or models" dialog when opening a file from
a command line argument
This commit is contained in:
parent
6b8a195fb4
commit
abfd7e9266
2 changed files with 5 additions and 5 deletions
|
@ -805,7 +805,7 @@ class CuraApplication(QtApplication):
|
||||||
|
|
||||||
def _onPostStart(self):
|
def _onPostStart(self):
|
||||||
for file_name in self._files_to_open:
|
for file_name in self._files_to_open:
|
||||||
self.callLater(self._openFile, file_name)
|
self.callLater(self._openFile, file_name, True)
|
||||||
for file_name in self._open_file_queue: # Open all the files that were queued up while plug-ins were loading.
|
for file_name in self._open_file_queue: # Open all the files that were queued up while plug-ins were loading.
|
||||||
self.callLater(self._openFile, file_name)
|
self.callLater(self._openFile, file_name)
|
||||||
|
|
||||||
|
@ -1549,8 +1549,8 @@ class CuraApplication(QtApplication):
|
||||||
return
|
return
|
||||||
job._node.setMeshData(mesh_data)
|
job._node.setMeshData(mesh_data)
|
||||||
|
|
||||||
def _openFile(self, filename):
|
def _openFile(self, filename, skip_project_file_check = False):
|
||||||
self.readLocalFile(QUrl.fromLocalFile(filename))
|
self.readLocalFile(QUrl.fromLocalFile(filename), skip_project_file_check)
|
||||||
|
|
||||||
def _addProfileReader(self, profile_reader):
|
def _addProfileReader(self, profile_reader):
|
||||||
# TODO: Add the profile reader to the list of plug-ins that can be used when importing profiles.
|
# TODO: Add the profile reader to the list of plug-ins that can be used when importing profiles.
|
||||||
|
|
|
@ -87,9 +87,9 @@ class SingleInstance:
|
||||||
if command == "clear-all":
|
if command == "clear-all":
|
||||||
self._application.callLater(lambda: self._application.deleteAll())
|
self._application.callLater(lambda: self._application.deleteAll())
|
||||||
|
|
||||||
# Command: Load a model file
|
# Command: Load a model or project file
|
||||||
elif command == "open":
|
elif command == "open":
|
||||||
self._application.callLater(lambda f = payload["filePath"]: self._application._openFile(f))
|
self._application.callLater(lambda f, skip_check = payload["filePath"]: self._application._openFile(f, skip_check))
|
||||||
|
|
||||||
# Command: Activate the window and bring it to the top.
|
# Command: Activate the window and bring it to the top.
|
||||||
elif command == "focus":
|
elif command == "focus":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue