From c080b34abbd7486fc8acced75fe22c6b8ed57395 Mon Sep 17 00:00:00 2001 From: Mario Voigt Date: Fri, 2 Apr 2021 10:18:33 +0200 Subject: [PATCH] added handling for non-selection in boundingbox extension --- extensions/fablabchemnitz/boundingbox.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/extensions/fablabchemnitz/boundingbox.py b/extensions/fablabchemnitz/boundingbox.py index e698a127..ebd687b5 100644 --- a/extensions/fablabchemnitz/boundingbox.py +++ b/extensions/fablabchemnitz/boundingbox.py @@ -39,8 +39,13 @@ class DrawBBoxes(inkex.Effect): for id, item in self.svg.selected.items(): self.drawBBox(item.bounding_box()) else: + inkex.utils.debug("") #self.drawBBox(self.svg.get_selected_bbox()) #works for InkScape (1:1.0+devel+202008292235+eff2292935) @ Linux and for Windows (but with deprecation) self.drawBBox(self.svg.selection.bounding_box()) #works for InkScape 1.1dev (9b1fc87, 2020-08-27)) @ Windows + else: + inkex.errormsg('Please select some objects first.') + return + if __name__ == '__main__': DrawBBoxes().run() \ No newline at end of file