Bug 395375 - Pop-up palette rotates with canvas if using external ring
Summary: Pop-up palette rotates with canvas if using external ring
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: CPU Canvas (other bugs)
Version First Reported In: git master (please specify the git hash!)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-14 15:14 UTC by krzysio.kurek
Modified: 2018-06-26 15:11 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Visualisation of the bug (695.46 KB, video/webm)
2018-06-14 15:14 UTC, krzysio.kurek
Details
test (1.15 MB, video/mp4)
2018-06-14 15:31 UTC, mvowada
Details

Note You need to log in before you can comment on or make changes to this bug.
Description krzysio.kurek 2018-06-14 15:14:19 UTC
Created attachment 113315 [details]
Visualisation of the bug

If you try to rotate the canvas using pop-up palette the palette will move with the rotating canvas.
Comment 1 mvowada 2018-06-14 15:25:48 UTC
Thanks. It seems I can't reproduce this 
- on Ubuntu 14.04
- using Krita: 4.1.0-pre-alpha (git b01e10e), 
- "Configure Krita" > "Display" > "Canvas Graphics Acceleration" enabled.
Comment 2 mvowada 2018-06-14 15:31:01 UTC
Created attachment 113316 [details]
test
Comment 3 Halla Rempt 2018-06-14 15:51:22 UTC
Hi Krysio,

Can you tell us exactly what OS you are using and which version of Krita? Can you also paste the output of help/system information for bug reports?
Comment 4 krzysio.kurek 2018-06-14 15:56:46 UTC
I'm using Kubuntu 18.04
System information:

Krita
  Version: 4.1.0-pre-alpha (git cc25aed)

OS Information
  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 4.15.0-23-generic
  Pretty Productname: Ubuntu 18.04 LTS
  Product Type: ubuntu
  Product Version: 18.04

OpenGL Info 
  Vendor:  NVIDIA Corporation 
  Renderer:  "GeForce GTX 950M/PCIe/SSE2" 
  Version:  "4.6.0 NVIDIA 396.24.02" 
  Shading language:  4.60 NVIDIA 
  Requested format:  QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::SwapBehavior(DoubleBuffer), swapInterval 0, profile  QSurfaceFormat::OpenGLContextProfile(CompatibilityProfile)) 
  Current format:    QSurfaceFormat(version 4.6, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 0, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::SwapBehavior(DoubleBuffer), swapInterval 0, profile  QSurfaceFormat::OpenGLContextProfile(CompatibilityProfile)) 
     Version: 4.6
     Supports deprecated functions true 
     is OpenGL ES: false
Comment 5 krzysio.kurek 2018-06-14 15:58:19 UTC
Oh okay, I didn't notice Canvas Graphics Acceleration was off. It works fine if I enable it.
Comment 6 Jonathan Liu 2018-06-21 13:23:55 UTC
I get this issue with Krita 4.0.4 with both 32-bit and 64-bit Windows versions if "Canvas Graphics Acceleration" is disabled or unavailable (for example if the graphics hardware does not support OpenGL version higher than 1.4...)
Comment 7 Jonathan Liu 2018-06-24 02:05:13 UTC
I have submitted a patch to fix the bug:
https://phabricator.kde.org/D13703
Comment 8 Dmitry Kazakov 2018-06-25 07:58:33 UTC
Git commit eadfec3dd43ecd72c3080a8796711477089511b8 by Dmitry Kazakov, on behalf of Jonathan Liu.
Committed on 25/06/2018 at 07:57.
Pushed by dkazakov into branch 'master'.

Do not scroll pop-up palette when setting document offset

Summary:
QWidget::scroll(int dx, int dy) will scroll the widget including its
children. Since KisPopupPalette is a child of KisQPainterCanvas when
using the QPainter-based canvas we want to scroll only the widget
and not its children by calling QWidget::scroll(int dx, int dy,
const QRect &r) instead.

Test Plan:
1. Click Settings > Configure Krita > Display
2. Uncheck "Canvas Graphics Acceleration" and click OK
3. File > New to create new document
4. Click "Freehand Brush Tool"
5. Right-click on canvas, rotate using wheel. The popup should not move.
6. Right-click on canvas, reset rotation by clicking at top circle of wheel. The popup should not move.
7. Right-click on canvas, zoom using zoom slider. The popup should not move.
8. Right-click on canvas, reset zoom to 100% by clicking "100%" button. The popup should not move,.

Reviewers: #krita, dkazakov

Reviewed By: #krita, dkazakov

Subscribers: dkazakov, #krita

Tags: #krita

Differential Revision: https://phabricator.kde.org/D13703

M  +1    -1    libs/flake/KoCanvasControllerWidget.cpp
M  +1    -1    libs/image/generator/kis_generator_layer.cpp

https://commits.kde.org/krita/eadfec3dd43ecd72c3080a8796711477089511b8
Comment 9 Halla Rempt 2018-06-25 08:14:45 UTC
Git commit befdf29e08828b85c2e30e30fae6d188a9d0805c by Boudewijn Rempt, on behalf of Jonathan Liu.
Committed on 25/06/2018 at 08:14.
Pushed by rempt into branch 'krita/4.1'.

Do not scroll pop-up palette when setting document offset

Summary:
QWidget::scroll(int dx, int dy) will scroll the widget including its
children. Since KisPopupPalette is a child of KisQPainterCanvas when
using the QPainter-based canvas we want to scroll only the widget
and not its children by calling QWidget::scroll(int dx, int dy,
const QRect &r) instead.

Test Plan:
1. Click Settings > Configure Krita > Display
2. Uncheck "Canvas Graphics Acceleration" and click OK
3. File > New to create new document
4. Click "Freehand Brush Tool"
5. Right-click on canvas, rotate using wheel. The popup should not move.
6. Right-click on canvas, reset rotation by clicking at top circle of wheel. The popup should not move.
7. Right-click on canvas, zoom using zoom slider. The popup should not move.
8. Right-click on canvas, reset zoom to 100% by clicking "100%" button. The popup should not move,.

Reviewers: #krita, dkazakov

Reviewed By: #krita, dkazakov

Subscribers: dkazakov, #krita

Tags: #krita

Differential Revision: https://phabricator.kde.org/D13703

M  +1    -1    libs/flake/KoCanvasControllerWidget.cpp
M  +1    -1    libs/image/generator/kis_generator_layer.cpp

https://commits.kde.org/krita/befdf29e08828b85c2e30e30fae6d188a9d0805c
Comment 10 Andrey 2018-06-26 15:11:52 UTC
Git commit 0d88587df4606973743ae75c6afc57a35f34c154 by Andrey Kamakin, on behalf of Jonathan Liu.
Committed on 26/06/2018 at 14:18.
Pushed by akamakin into branch 'akamakin/T8628-multithreading-optimization'.

Do not scroll pop-up palette when setting document offset

Summary:
QWidget::scroll(int dx, int dy) will scroll the widget including its
children. Since KisPopupPalette is a child of KisQPainterCanvas when
using the QPainter-based canvas we want to scroll only the widget
and not its children by calling QWidget::scroll(int dx, int dy,
const QRect &r) instead.

Test Plan:
1. Click Settings > Configure Krita > Display
2. Uncheck "Canvas Graphics Acceleration" and click OK
3. File > New to create new document
4. Click "Freehand Brush Tool"
5. Right-click on canvas, rotate using wheel. The popup should not move.
6. Right-click on canvas, reset rotation by clicking at top circle of wheel. The popup should not move.
7. Right-click on canvas, zoom using zoom slider. The popup should not move.
8. Right-click on canvas, reset zoom to 100% by clicking "100%" button. The popup should not move,.

Reviewers: #krita, dkazakov

Reviewed By: #krita, dkazakov

Subscribers: dkazakov, #krita

Tags: #krita

Differential Revision: https://phabricator.kde.org/D13703

M  +1    -1    libs/flake/KoCanvasControllerWidget.cpp
M  +1    -1    libs/image/generator/kis_generator_layer.cpp

https://commits.kde.org/krita/0d88587df4606973743ae75c6afc57a35f34c154