From 69a1052a445e4ab9f6faffeb98ecbe8000f53167 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Wed, 30 Mar 2022 18:08:47 +0300 Subject: [PATCH] - when doing PDF printing and no object is selected now the default action is to print everything that fits within the workspace --- CHANGELOG.md | 1 + appMain.py | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2941d1b0..8502fb75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ CHANGELOG for FlatCAM Evo beta - some minor changes in Distance Plugin - when changing workspace orientation fixed leaving behind the old frame on the canvas - improved how the PDF printing works: now the Excellon files are always on top and from the rest of objects the first selected is on top, below the Excellons +- when doing PDF printing and no object is selected now the default action is to print everything that fits within the workspace 29.03.2022 diff --git a/appMain.py b/appMain.py index bf68f6d4..32280d66 100644 --- a/appMain.py +++ b/appMain.py @@ -10594,15 +10594,16 @@ class MenuFileHandlers(QtCore.QObject): if len(obj_selection) == 1: obj_name = str(obj_selection[0].obj_options['name']) else: - obj_name = _("FlatCAM objects print") + obj_name = _("General_print") except AttributeError as att_err: self.log.debug("App.on_file_save_object_pdf() --> %s" % str(att_err)) - self.inform.emit('[ERROR_NOTCL] %s' % _("No object is selected.")) + self.inform.emit('[ERROR_NOTCL] %s' % _("Failed.")) return if not obj_selection: - self.inform.emit('[ERROR_NOTCL] %s' % _("No object is selected.")) - return + self.inform.emit( + '[WARNING_NOTCL] %s %s' % (_("No object is selected."), _("Print everything in the workspace."))) + obj_selection = self.app.collection.get_list() filter_ = "PDF File .pdf (*.PDF);; All Files (*.*)" try: