This forum has been archived. All content is frozen. Please use KDE Discuss instead.

What file do I need to edit?

Tags: None
(comma "," separated)
driveprogramming
Registered Member
Posts
2
Karma
0

What file do I need to edit?

Thu Jan 26, 2023 5:28 am
https://bugs.kde.org/show_bug.cgi?id=464651
I found and reported a bug where scale styles was not enabled in tool options when multiple vector paths were selected.
Resizing multiple vector paths forces the thickness of the paths to change.

https://bugs.kde.org/show_bug.cgi?id=414352
And I found a bug report from 3 years ago similar to mine.
However, this bug is still not fixed.
So I built krita on my windows.

I want to enable scale styles and keep the thickness of the vector paths constant.
I found DefaultToolGeometryWidget.cpp and tried to modify it.
Code: Select all
    if (uniformScalingAvailable && !chkUniformScaling->isEnabled()) {
        chkUniformScaling->setChecked(m_savedUniformScaling);
        chkUniformScaling->setEnabled(uniformScalingAvailable);
    } else if (!uniformScalingAvailable && chkUniformScaling->isEnabled()) {
        m_savedUniformScaling = chkUniformScaling->isChecked();
        chkUniformScaling->setChecked(true);
        chkUniformScaling->setEnabled(uniformScalingAvailable);
    }

Code: Select all
    if (uniformScalingAvailable && !chkUniformScaling->isEnabled()) {
        chkUniformScaling->setChecked(m_savedUniformScaling);
        chkUniformScaling->setEnabled(uniformScalingAvailable);
    } else if (!uniformScalingAvailable && chkUniformScaling->isEnabled()) {
        m_savedUniformScaling = chkUniformScaling->isChecked();
        chkUniformScaling->setChecked(m_savedUniformScaling);
        chkUniformScaling->setEnabled(true);
    }

So scale styles is enabled, but the thickness of the vector paths is still changing.
And I'm not a coder, so I don't fully understand this code.
This file seems to be a file for widget, and this file doesn't seem to be able to modify vector paths.
What file do I need to edit to keep the thickness of multiple vector paths constant when resizing them?
User avatar
TheraHedwig
KDE Developer
Posts
1794
Karma
10
OS

Re: What file do I need to edit?

Thu Jan 26, 2023 12:34 pm
Hi,

next time it might be better to use krita-artists.org.

The file you are trying to edit only controls the checkboxes. The code is in KoFlake::resizeShapeCommon which is called by KoShapeResizeCommand::redoNoUpdate(), called by ShapeResizeStrategy::resizeBy(), which is called by the DefaultTool, whose widget you're now editing. I can't help any further than that, because if I knew where the bug was I'd have fixed it already (and it is a bug considering it apparently worked in this fixed bug).

Your best bet is to see whether that postTransform/Uniform Scaling boolean is turned off somewhere along the lines by using qDebug() << variable_name statements and building that.
driveprogramming
Registered Member
Posts
2
Karma
0

Re: What file do I need to edit?

Thu Jan 26, 2023 1:07 pm
Hi, Thank you so much for your answer.
If you can't find where the bug is, I'm not a coder so I doubt I can find it.
But I will analyze the code you told me.
Thank you so much again.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]