summaryrefslogtreecommitdiffstats
path: root/src/flood-context.cpp
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2007-02-26 20:43:43 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2007-02-26 20:43:43 +0000
commit70319d73c446e72c30cae819e449caa50ad9a990 (patch)
tree7954f6a449a33f9fb9af6493d3c3d04faf2d3c1e /src/flood-context.cpp
parentrename flood to paintbucket, copyedit (diff)
downloadinkscape-70319d73c446e72c30cae819e449caa50ad9a990.tar.gz
inkscape-70319d73c446e72c30cae819e449caa50ad9a990.zip
warn if unable to fill an unbounded area
(bzr r2450)
Diffstat (limited to 'src/flood-context.cpp')
-rw-r--r--src/flood-context.cpp7
1 files changed, 6 insertions, 1 deletions
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, _("<b>Area is not bounded</b>, 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, _("<b>Area is not bounded</b>, cannot fill."));
return;
}