From: buliabyak Date: Mon, 26 Feb 2007 20:43:43 +0000 (+0000) Subject: warn if unable to fill an unbounded area X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6ec35538b3387ac72af1c9e921e531b75250f2d4;p=inkscape.git warn if unable to fill an unbounded area --- diff --git a/src/flood-context.cpp b/src/flood-context.cpp index f9b3c5ffc..78f8b97dd 100644 --- a/src/flood-context.cpp +++ b/src/flood-context.cpp @@ -32,6 +32,7 @@ #include "snap.h" #include "desktop.h" #include "desktop-style.h" +#include "message-stack.h" #include "message-context.h" #include "pixmaps/cursor-rect.xpm" #include "flood-context.h" @@ -358,7 +359,10 @@ static void sp_flood_do_flood_fill(SPEventContext *event_context, GdkEvent *even SPItem *document_root = SP_ITEM(SP_DOCUMENT_ROOT(document)); NR::Rect bbox = document_root->invokeBbox(NR::identity()); - if (bbox.isEmpty()) { return; } + if (bbox.isEmpty()) { + desktop->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Area is not bounded, cannot fill.")); + return; + } int width = (int)ceil(bbox.extent(NR::X)); int height = (int)ceil(bbox.extent(NR::Y)); @@ -488,6 +492,7 @@ static void sp_flood_do_flood_fill(SPEventContext *event_context, GdkEvent *even if (aborted) { g_free(trace_px); + desktop->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Area is not bounded, cannot fill.")); return; }