summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: da58580)
raw | patch | inline | side by side (parent: da58580)
author | pjrm <pjrm@users.sourceforge.net> | |
Thu, 11 Oct 2007 12:21:05 +0000 (12:21 +0000) | ||
committer | pjrm <pjrm@users.sourceforge.net> | |
Thu, 11 Oct 2007 12:21:05 +0000 (12:21 +0000) |
src/selection-chemistry.cpp | patch | blob | history |
index ec4f096dd4164290f04695316f792e412ee5c0c6..0aa884f56f7de50e7be67a065e7eb05f7d0b8f94 100644 (file)
g_return_if_fail(doc != NULL);
g_return_if_fail(desktop->selection != NULL);
- g_return_if_fail(!desktop->selection->isEmpty());
+ if (desktop->selection->isEmpty()) {
+ desktop->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Select <b>object(s)</b> to fit canvas to."));
+ return;
+ }
NR::Maybe<NR::Rect> const bbox(desktop->selection->bounds());
if (bbox && !bbox->isEmpty()) {
doc->fitToRect(*bbox);