[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-kimageshop
Subject: Re: [calligra/krita-texturizer_option-rempt] krita/plugins/paintops/libpaintop:
From: Boudewijn Rempt <boud () valdyas ! org>
Date: 2012-03-27 13:36:44
Message-ID: alpine.LNX.2.00.1203271536250.8185 () calcifer ! valdyas ! org
[Download RAW message or body]
Okay -- as I said before, this part of Krita is all new to me :-)
On Tue, 27 Mar 2012, Lukast dev wrote:
> Hi,
>
> I wouldn't do that. I think it is better to save the state of the
> option and and also save
> if it is checked or not.
>
> That way when you use some preset, you can enable/disable
> some subset of options quickly.
>
> And you have to save if the option is enabled.
> Otherwise some other preset where it is enabled will
> leave it enabled for the preset where it is disabled :)
>
> Dňa 26. marca 2012 21:12, Boudewijn Rempt <boud@valdyas.org> napísal/a:
> > Git commit e5b1d7f4014f451892ad98f82f17286873232c61 by Boudewijn Rempt.
> > Committed on 26/03/2012 at 21:11.
> > Pushed by rempt into branch 'krita-texturizer_option-rempt'.
> >
> > Don't save the texture options if they aren't used
> >
> > M +3 -1 krita/plugins/paintops/libpaintop/kis_texture_option.cpp
> >
> > http://commits.kde.org/calligra/e5b1d7f4014f451892ad98f82f17286873232c61
> >
> > diff --git a/krita/plugins/paintops/libpaintop/kis_texture_option.cpp \
> > b/krita/plugins/paintops/libpaintop/kis_texture_option.cpp index d247180..251a670 \
> > 100644
> > --- a/krita/plugins/paintops/libpaintop/kis_texture_option.cpp
> > +++ b/krita/plugins/paintops/libpaintop/kis_texture_option.cpp
> > @@ -129,7 +129,9 @@ KisTextureOption::~KisTextureOption()
> >
> > void KisTextureOption::writeOptionSetting(KisPropertiesConfiguration* setting) \
> > const {
> > + if (!isChecked()) return;
> > if (!m_optionWidget->chooser->currentResource()) return;
> > +
> > KisPattern *pattern = \
> > static_cast<KisPattern*>(m_optionWidget->chooser->currentResource()); if \
> > (!pattern) return;
> > @@ -155,7 +157,6 @@ void \
> > KisTextureOption::writeOptionSetting(KisPropertiesConfiguration* setting) c \
> > setting->setProperty("Texture/Pattern/Pattern", ba.toBase64()); \
> > setting->setProperty("Texture/Pattern/PatternFileName", pattern->filename()); \
> > setting->setProperty("Texture/Pattern/Name", pattern->name());
> > -
> > setting->setProperty("Texture/Pattern/Enabled", isChecked());
> > }
> >
> > @@ -164,6 +165,7 @@ void KisTextureOption::readOptionSetting(const \
> > KisPropertiesConfiguration* setti QByteArray ba = \
> > QByteArray::fromBase64(setting->getString("Texture/Pattern/Pattern").toAscii()); \
> > QImage img; img.loadFromData(ba, "PNG");
> > +
> > QString name = setting->getString("Texture/Pattern/Name");
> > if (name.isEmpty()) {
> > name = setting->getString("Texture/Pattern/FileName");
>
_______________________________________________
kimageshop mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic