Commit e98daba8 authored by Agata Cacko's avatar Agata Cacko
Browse files

Fix presets with random offset of texture marked dirty

Before this commit, if a preset had at least one random offset (X or Y)
in texture settings (and texture enabled), it was marked dirty as soon
as the user used this brush on the canvas. That was happenning because
random offset just means that the offset of the texture is set
to a new random one after every stroke. Setting a property to a new value
marked preset as dirty.
This commit ensures that in this case te preset is not set to dirty
(it just disables dirty notifications while the new offset is set).

parent 4bd040a1
......@@ -138,6 +138,8 @@ bool KisPaintOpSettings::mouseReleaseEvent()
void KisPaintOpSettings::setRandomOffset(const KisPaintInformation &paintInformation)
bool disableDirtyBefore = d->disableDirtyNotifications;
d->disableDirtyNotifications = true;
if (getBool("Texture/Pattern/Enabled")) {
if (getBool("Texture/Pattern/isRandomOffsetX")) {
......@@ -149,7 +151,7 @@ void KisPaintOpSettings::setRandomOffset(const KisPaintInformation &paintInforma
d->disableDirtyNotifications = disableDirtyBefore;
bool KisPaintOpSettings::hasMaskingSettings() const
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment