summaryrefslogtreecommitdiffstats
path: root/src/splivarot.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2007-01-07 16:49:07 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2007-01-07 16:49:07 +0000
commit631b310516dc651c441bd6c03439479cd91a6a9a (patch)
treee568189055748a6db502befc1e83af00f96930eb /src/splivarot.cpp
parentcomment on possible optimization (diff)
downloadinkscape-631b310516dc651c441bd6c03439479cd91a6a9a.tar.gz
inkscape-631b310516dc651c441bd6c03439479cd91a6a9a.zip
Fixed crash when doing a boolean union when nothing is selected.
(bzr r2145)
Diffstat (limited to 'src/splivarot.cpp')
-rw-r--r--src/splivarot.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/splivarot.cpp b/src/splivarot.cpp
index 1d0e4e7df..f4f43fd49 100644
--- a/src/splivarot.cpp
+++ b/src/splivarot.cpp
@@ -103,13 +103,18 @@ sp_selected_path_boolop(bool_op bop, const unsigned int verb, const Glib::ustrin
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
Inkscape::Selection *selection = sp_desktop_selection(desktop);
-
+
GSList *il = (GSList *) selection->itemList();
-
- if (g_slist_length(il) < 2 && bop != bool_op_union) {
+
+ // allow union on a single object for the purpose of removing self overlapse (svn log, revision 13334)
+ if ( (g_slist_length(il) < 2) && (bop != bool_op_union)) {
desktop->messageStack()->flash(Inkscape::ERROR_MESSAGE, _("Select <b>at least 2 paths</b> to perform a boolean operation."));
return;
}
+ else if ( g_slist_length(il) < 1 ) {
+ desktop->messageStack()->flash(Inkscape::ERROR_MESSAGE, _("Select <b>at least 1 path</b> to perform a boolean union."));
+ return;
+ }
if (g_slist_length(il) > 2) {
if (bop == bool_op_diff || bop == bool_op_symdiff || bop == bool_op_cut || bop == bool_op_slice ) {