mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 03:26:02 +08:00
Simplify return
This commit is contained in:
parent
aa6105f1be
commit
c0933ddb2d
@ -170,13 +170,11 @@ class CloudOutputDevice(UltimakerNetworkedPrinterOutputDevice):
|
|||||||
|
|
||||||
# Show an error message if we're already sending a job.
|
# Show an error message if we're already sending a job.
|
||||||
if self._progress.visible:
|
if self._progress.visible:
|
||||||
message = Message(
|
return Message(
|
||||||
text=I18N_CATALOG.i18nc("@info:status", "Please wait until the current job has been sent."),
|
text=I18N_CATALOG.i18nc("@info:status", "Please wait until the current job has been sent."),
|
||||||
title=I18N_CATALOG.i18nc("@info:title", "Print error"),
|
title=I18N_CATALOG.i18nc("@info:title", "Print error"),
|
||||||
lifetime=10
|
lifetime=10
|
||||||
)
|
).show()
|
||||||
message.show()
|
|
||||||
return
|
|
||||||
|
|
||||||
if self._uploaded_print_job:
|
if self._uploaded_print_job:
|
||||||
# The mesh didn't change, let's not upload it again
|
# The mesh didn't change, let's not upload it again
|
||||||
|
@ -118,13 +118,11 @@ class NetworkOutputDevice(UltimakerNetworkedPrinterOutputDevice):
|
|||||||
|
|
||||||
# Show an error message if we're already sending a job.
|
# Show an error message if we're already sending a job.
|
||||||
if self._progress.visible:
|
if self._progress.visible:
|
||||||
message = Message(
|
return Message(
|
||||||
text=I18N_CATALOG.i18nc("@info:status", "Please wait until the current job has been sent."),
|
text=I18N_CATALOG.i18nc("@info:status", "Please wait until the current job has been sent."),
|
||||||
title=I18N_CATALOG.i18nc("@info:title", "Print error"),
|
title=I18N_CATALOG.i18nc("@info:title", "Print error"),
|
||||||
lifetime=10
|
lifetime=10
|
||||||
)
|
).show()
|
||||||
message.show()
|
|
||||||
return
|
|
||||||
|
|
||||||
self.writeStarted.emit(self)
|
self.writeStarted.emit(self)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user