From 300755c436ff2dfb9cdcb18aeb14cc368631b784 Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Sat, 17 Aug 2024 17:29:54 +0200 Subject: add wxpython abort message (as alternative to stderr output) (#3145) --- lib/extensions/element_info.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/extensions/element_info.py') diff --git a/lib/extensions/element_info.py b/lib/extensions/element_info.py index 846bba17..2f3de736 100644 --- a/lib/extensions/element_info.py +++ b/lib/extensions/element_info.py @@ -4,6 +4,7 @@ # Licensed under the GNU GPL version 3.0 or later. See the file LICENSE for details. from ..elements import FillStitch, SatinColumn, Stroke +from ..gui.abort_message import AbortMessageApp from ..gui.element_info import ElementInfoApp from ..i18n import _ from ..stitch_plan import stitch_groups_to_stitch_plan @@ -15,6 +16,11 @@ class ElementInfo(InkstitchExtension): def effect(self): if not self.svg.selection or not self.get_elements(): + app = AbortMessageApp( + _("Please select at least one element."), + _("https://inkstitch.org/docs/troubleshoot/#element-info") + ) + app.MainLoop() return self.metadata = self.get_inkstitch_metadata() -- cgit v1.2.3