Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set color does not work in groups #5

Open
Neon22 opened this issue Jan 18, 2020 · 1 comment
Open

set color does not work in groups #5

Neon22 opened this issue Jan 18, 2020 · 1 comment

Comments

@Neon22
Copy link

Neon22 commented Jan 18, 2020

Color can not be set on a group. Each internal symbol in a group has to be selected to recolor.
This makes recoloring groups very time consuming. Groups are super useful.

To make the tool work the code in cell.cpp needs to check if item is grouped then iterate over children.

Code is here:

void Cell::setBgColor(QColor c)
{
    if (mBgColor != c) {
        QString old = "";
        if (mBgColor.isValid())
            old = mBgColor.name();
        mBgColor = c;
        emit colorChanged(old, c.name());
        update();
    }
}

void Cell::setColor(QColor c)
{

    if(mColor != c) {
        QString old = "";
        if(mColor.isValid())
            old = mColor.name();
        mColor = c;

        QSvgRenderer *r = stitch()->renderSvg(c);
        if(r)
            setSharedRenderer(r);

        emit colorChanged(old, c.name());
        update();
    }

}

Check is bool Cell::isGrouped()

@Neon22
Copy link
Author

Neon22 commented Jan 25, 2020

This would be IMHO the second priority thing to fix.
All users use grouping to gather stitches for repeats.
They all need to recolor rows of stitches.

The workaround is hard for most people as it involves pre-planning - making two or more groups which are pre-colored before assembling their diagram.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant