X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=inline;f=src%2Fmain.cpp;h=dff671c638650b8f42ff98cfb9bd7a271df39d85;hb=ed7e0c1c7763ae6961d4fe2a987536657323cdad;hp=c6892a5aa11343e1f09927a1c0a0c9482d42ff07;hpb=7c49c68cb7768a1f227bfbfc37b4ed12533fa5f7;p=inkscape.git diff --git a/src/main.cpp b/src/main.cpp index c6892a5aa..dff671c63 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -789,15 +789,20 @@ do_query_dimension (SPDocument *doc, bool extent, NR::Dim2 const axis, const gch if (o) { sp_document_ensure_up_to_date (doc); SPItem *item = ((SPItem *) o); - NR::Rect area = item->invokeBbox(sp_item_i2doc_affine(item)); // "true" SVG bbox for scripting - Inkscape::SVGOStringStream os; - if (extent) { - os << area.extent(axis); + // "true" SVG bbox for scripting + NR::Maybe area = item->getBounds(sp_item_i2doc_affine(item)); + if (area) { + Inkscape::SVGOStringStream os; + if (extent) { + os << area->extent(axis); + } else { + os << area->min()[axis]; + } + g_print ("%s", os.str().c_str()); } else { - os << area.min()[axis]; + g_print("0"); } - g_print ("%s", os.str().c_str()); } } @@ -1407,7 +1412,7 @@ sp_process_args(poptContext ctx) gchar const *arg = poptGetOptArg(ctx); if (arg != NULL) { // printf("Adding in: %s\n", arg); - new Inkscape::CmdLineAction(a, arg); + new Inkscape::CmdLineAction((a == SP_ARG_VERB), arg); } break; }