https://bugs.kde.org/show_bug.cgi?id=415747

            Bug ID: 415747
           Summary: Phantom off-canvas content with vector objects
           Product: krita
           Version: nightly build (please specify the git hash!)
          Platform: Debian stable
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Layers/Vector
          Assignee: krita-bugs-n...@kde.org
          Reporter: ahab.greybe...@hotmail.co.uk
  Target Milestone: ---

Created attachment 124814
  --> https://bugs.kde.org/attachment.cgi?id=124814&action=edit
Simple image file for convenient use

SUMMARY
This happens with the 4.2.8 and the Dec28 4.3.0 prealpha (git 3f0ff1a)
appimages and the Windows portable .zip packages.
It does not happen with version 4.2.6 or 4.2.7.1
However, see Additional Notes.

If a vector object is moved off-canvas and then moved back on-canvas, phantom
content is created off-canvas at the location where the object was moved to.
This content can be seen on the layer thumbnail and is included in the Move
Tool content bounding box.
It has an effect on the Trim operations and it affects .svg export.
It is removed when the image is Saved.

I attach a simple .kra file that can be used for convenience to demonstrate the
problem.

STEPS TO REPRODUCE
1. Open two-vector-objects.kra and use the Move tool to note that the extent of
content is limited to the circle and the rectangle on the canvas, as expected.
2. Zoom out a little so there is a good amount of off-canvas area on the
workspace, for ease of further manipulation.

3. Use the Select Shapes Tool to move the circle left to an off-canvas
location, then click on the canvas to clear the object selection.
4. Use the Move Tool to check the extent of content and note that it includes
the off-canvas circle, as would be expected.
At this stage, the layer thumbnail will have been updated to show the circle
and rectangle.

5. Use the Shapes Select Tool to move the rectangle close to the left edge of
the canvas, to get the shapes close together for convenience during the next
steps.
6. Use the Move Tool to move the rectangle and circle into the middle of the
canvas then press ruturn to finalise the move.
Note that the layer thumbnail shows a 'phantom' red circle off-canvas to the
left.

7. Use the Move Tool again and Note that the extent of content includes the
phanton red circle off-canvas to the left.
Move the content to the right so that the rectangle moves off canvas to the
right and note that there is nothing visible at the left side of the content
bounding box.

8. Move the content back to the left so that the rectangle and circle are in
the middle again.
Note that the layer thumbnail shows a complete or partial rectangle off-canvas
the the left.
Note that the Move Tool now indicates there is content off-canvas to the right.

9. Do Image -> Trim To Image Size and Note that this has no effect on the
phantom off-canvas content.
10. Do Layer -> Import/Export -> Save Vector Layer As SVG and save the .svg
file.

11. Do File -> New and make a new 2048 x 2048 image then do Layer ->
Import/Export -> Import Layer and open the saved .svg file.
Note that the circle and rectangle are badly offset. i.e, the phantom content
has affected the .svg export.
Close this new image without saving it, that was only for demonstration.

12. Do Image -> Trim to Current Layer and Note that the trim action is affected
by and takes account of the phantom off-canvas content.
13. Do Undo Crop (trim) Image to restore the original image size.
14. Do File -> Save then close the open image and then File -> Open to open it
again.
Note that the phantom content is now gone.

OBSERVED RESULT
See Steps to Reproduce

EXPECTED RESULT
The phantom content should not exist.

ADDITIONAL INFORMATION
With 4.2.6, phantom content is not created but the Move tool bounding box does
not include genuine off-canvas content. However, the Move Tool will cause
genuine off-canvas content to move.

With 4.2.7.1, there is temporary phantom off-canvas content as shown by the
layer thumbnail but this goes away when the Move Tool is used again after
moving the circle back on-canvas.

SOFTWARE/OS VERSIONS
Krita

 Version: 4.3.0-prealpha (git 3f0ff1a)
 Languages: en_GB, en, en, en_GB, en
 Hidpi: true

Qt

  Version (compiled): 5.12.5
  Version (loaded): 5.12.5

OS Information

  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 4.19.0-6-amd64
  Pretty Productname: Debian GNU/Linux 10 (buster)
  Product Type: debian
  Product Version: 10

OpenGL Info

  Vendor:  "NVIDIA Corporation" 
  Renderer:  "GeForce GTX 750 Ti/PCIe/SSE2" 
  Version:  "4.6.0 NVIDIA 418.74" 
  Shading language:  "4.60 NVIDIA" 
  Requested format:  QSurfaceFormat(version 3.0, options
QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24,
redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8,
stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer,
swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile 
QSurfaceFormat::CompatibilityProfile) 
  Current format:    QSurfaceFormat(version 4.6, options
QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24,
redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8,
stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer,
swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile 
QSurfaceFormat::CompatibilityProfile) 
     Version: 4.6
     Supports deprecated functions true 
     is OpenGL ES: false 

QPA OpenGL Detection Info 
  supportsDesktopGL: true 
  supportsOpenGLES: true 
  isQtPreferOpenGLES: false 

Hardware Information

  GPU Acceleration: auto
  Memory: 16039 Mb
  Number of Cores: 8
  Swap Location: /tmp

Current Settings

  Current Swap Location: /tmp
  Undo Enabled: 1
  Undo Stack Limit: 18
  Use OpenGL: 1
  Use OpenGL Texture Buffer: 1
  Use AMD Vectorization Workaround: 0
  Canvas State: OPENGL_SUCCESS
  Autosave Interval: 360
  Use Backup Files: 1
  Number of Backups Kept: 1
  Backup File Suffix: ~
  Backup Location: Same Folder as the File
  Use Win8 Pointer Input: 0
  Use RightMiddleTabletButton Workaround: 0
  Levels of Detail Enabled: 0
  Use Zip64: 0

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to