I reworked the sp_selected_path_do_offset similarly, so that it also can work with multiple selections and preserves z-order and parent.
When testing it, I pressed ctrl+) and ctrl+( many times on a star with 32 sharp long tips, and sometimes (not sure when, seemingly at random) it crashed for that shape. Here's the backtrace of one such crash:
Program received signal SIGSEGV, Segmentation fault. 0x408e96d0 in mallopt () from /lib/i686/libc.so.6 (gdb) bt #0 0x408e96d0 in mallopt () from /lib/i686/libc.so.6 #1 0x408e7fd2 in realloc () from /lib/i686/libc.so.6 #2 0x081a2e3b in Shape::AddEdge(int, int) (this=0x89f7c50, st=106, en=107) at Shape.cpp:1241 #3 0x081972d6 in Path::DoLeftJoin(Shape*, double, join_typ, NR::Point, NR::Point, NR::Point, double, double, double, int&, int&, int, int, double) (dest=0x89f7c50, width=2, join=join_pointy, pos={_pt = {369.90625, 535.15625}}, prev=Cannot access memory at address 0x6a ) at PathStroke.cpp:591 #4 0x081a8292 in Shape::MakeOffset(Shape*, double, join_typ, double) (this=0x89f7c50, a=0x89b5758, dec=Unhandled dwarf expression opcode ) at nr-point.h:34 #5 0x080d28cc in sp_selected_path_do_offset(bool) (expand=false) at splivarot.cpp:1125 #6 0x080d1c5d in sp_selected_path_inset() () at splivarot.cpp:713 #7 0x081520c7 in sp_action_perform(_SPAction*, void*) (action=0x85cb678, data=0x0) at action.cpp:128 #8 0x080bdc7d in sp_shortcut_invoke(unsigned, _SPView*) (shortcut=50331688, view=0x829d270) at shortcuts.cpp:33 #9 0x08145bf6 in sp_window_key_press (widget=0x869d5d8, event=0x86d2a04) at window.cpp:31 #10 0x4010192c in _gtk_marshal_BOOLEAN__BOXED () from /usr/lib/libgtk-x11-2.0.so.0 #11 0x0869d5d8 in ?? () #12 0x086d2a04 in ?? ()
_________________________________________________________________ MSN Premium with Virus Guard and Firewall* from McAfee� Security : 2 months FREE* http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI...