Bug 364289 - Mirror Mode always initiates with axis at the center of the 2nd document on the canvas of the 1st document
Summary: Mirror Mode always initiates with axis at the center of the 2nd document on t...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Usability (show other bugs)
Version: 3.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-14 05:41 UTC by Tyson Tan
Modified: 2016-11-03 00:43 UTC (History)
2 users (show)

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


Attachments
Krita use fixed axises position across all document tabs. (239.49 KB, image/png)
2016-06-14 05:48 UTC, Tyson Tan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tyson Tan 2016-06-14 05:41:26 UTC
When 2 documents are opened at the same time, "Set horizontal Mirror Mode" and "Set vertical Mirror Mode" always initiates their axises at the center of the 2nd document, even when we are using them on the 1st canvas.

This bug is worse when the dimensions of the 2nd document is more than 2X larger than the 1st document -- the axises are initiated outside the canvas and thus cannot be seen or dragged. Causing great confusion. (at some point I thought the customizable axis feature was canceled because of this bug)

Reproducible: Always

Steps to Reproduce:
1. Create 1st document, size: 256x256
2. Create 2nd document size: 512x512
3. Switch to 1st document
4. Press "Set horizontal Mirror Mode" and "Set vertical Mirror Mode".

Actual Results:  
Axises are initiated on the edge of 1st document.

Expected Results:  
Axises should always be initiated at the center of a document.
Each opened document should have their own separated parameter on Mirror Mode axises.

Can also be triggered using another way:
1. Create 1st document, size: 256x256
2. Press "Set horizontal Mirror Mode" and "Set vertical Mirror Mode".
3. Create 2nd document size: 512x512
4. Switch to 1st document

The result: the axises of the 1st document automatically pushed to the edge match the situation of the 2nd document on pixel level.
Comment 1 Tyson Tan 2016-06-14 05:48:24 UTC
Created attachment 99487 [details]
Krita use fixed axises position across all document tabs.
Comment 2 Raghavendra kamath 2016-06-15 16:12:11 UTC
I can confirm this behavior on arch linux too
Comment 3 Raghavendra kamath 2016-09-10 14:36:38 UTC
Just for an update : This bug is still present in current build from git master.
Comment 4 Dmitry Kazakov 2016-11-02 11:57:20 UTC
The problem is that currently the mirror axes are a part of the global canvas, not of the document, therefore the are shared :(
Comment 5 Dmitry Kazakov 2016-11-02 17:24:38 UTC
Git commit 6fbe5c3fcedadb8e99d24ac87ae7d051de4851be by Dmitry Kazakov.
Committed on 02/11/2016 at 17:24.
Pushed by dkazakov into branch 'rempt/impex-refactoring'.

Make Mirror Mode have different axes centers for each opened image
Fixes T4226

M  +22   -0    libs/image/kis_algebra_2d.h
M  +13   -0    libs/image/kis_image.cc
M  +13   -0    libs/image/kis_image.h
M  +3    -8    libs/ui/canvas/kis_mirror_axis.cpp
M  +0    -2    libs/ui/kis_canvas_resource_provider.h
M  +6    -4    libs/ui/tool/kis_resources_snapshot.cpp
M  +0    -3    sdk/tests/stroke_testing_utils.cpp

http://commits.kde.org/krita/6fbe5c3fcedadb8e99d24ac87ae7d051de4851be
Comment 6 Dmitry Kazakov 2016-11-02 17:56:59 UTC
Git commit 50b64e7e2f656e55cbe5be0a7c885acce9ac9846 by Dmitry Kazakov.
Committed on 02/11/2016 at 17:56.
Pushed by dkazakov into branch 'krita/3.1'.

Make Mirror Mode have different axes centers for each opened image
Fixes T4226

# Conflicts:
#	libs/image/kis_image.cc

M  +22   -0    libs/image/kis_algebra_2d.h
M  +13   -0    libs/image/kis_image.cc
M  +13   -0    libs/image/kis_image.h
M  +3    -8    libs/ui/canvas/kis_mirror_axis.cpp
M  +0    -2    libs/ui/kis_canvas_resource_provider.h
M  +6    -4    libs/ui/tool/kis_resources_snapshot.cpp
M  +0    -3    sdk/tests/stroke_testing_utils.cpp

http://commits.kde.org/krita/50b64e7e2f656e55cbe5be0a7c885acce9ac9846
Comment 7 Tyson Tan 2016-11-03 00:43:03 UTC
Thank you Dmitry! :D