3d box paste position is garbage
Summary:
3dBox is very broken.
Steps to reproduce:
- open Inkscape
- Make a 3dbox
- Copy it to clipboard
- Paste it a number of times
What happened?
Firstly a crash, this was fixed with:
diff --git a/src/ui/toolbar/box3d-toolbar.cpp b/src/ui/toolbar/box3d-toolbar.cpp
index de49a2b08e..96f0c96e99 100644
--- a/src/ui/toolbar/box3d-toolbar.cpp
+++ b/src/ui/toolbar/box3d-toolbar.cpp
@@ -287,6 +287,10 @@ Box3DToolbar::selection_changed(Inkscape::Selection *selection)
if (box) {
// FIXME: Also deal with multiple selected boxes
Persp3D *persp = box->get_perspective();
+ if (!persp) {
+ g_warning("Box has no perspective set!");
+ return;
+ }
persp_repr = persp->getRepr();
if (persp_repr) {
_repr = persp_repr;
Secondly the pasted items are tiny, likely a bad desktop/unit conversion.
Thirdly the pasted items appear depending on the zoom and are positioned on the opposite side of the page to where the mouse is. See the gif here:
What should have happened?
3dBox should work like other objects.
Sample attachments:
Debug info
- Inkscape 1.2 (main brain)
- Inkscape 1.1 (ppa, ubuntu 20.04)
Edited by Nathan Lee