7#include <klocalizedstring.h>
29 QSet<QString> changedIds;
49 if (prop.
state != valueForId(prop.
id, list2)) {
50 changedIds.insert(prop.
id);
62 m_newPropertyList(newPropertyList),
63 m_oldPropertyList(node->sectionModelProperties())
76 if (changed.isEmpty())
return;
90 if (changed.isEmpty())
return;
115 const QSet<QString> changedInTheMeantime =
119 bool onlyStatelessChanged =
true;
120 Q_FOREACH (
const QString &
id, changedInTheMeantime) {
161 const QRect &totalUpdateExtent)
167 if (oldPropertyList == newPropertyList) {
171 bool oldPassThroughValue =
false;
172 bool newPassThroughValue =
false;
174 bool oldVisibilityValue =
false;
175 bool newVisibilityValue =
false;
179 oldPassThroughValue = prop.
state.toBool();
182 oldVisibilityValue = prop.
state.toBool();
188 newPassThroughValue = prop.
state.toBool();
191 newVisibilityValue = prop.
state.toBool();
195 if (oldPassThroughValue && !newPassThroughValue) {
201 }
else if ((
m_node->
parent() && !oldPassThroughValue && newPassThroughValue) ||
202 (oldPassThroughValue && newPassThroughValue &&
203 !oldVisibilityValue && newVisibilityValue)) {
219 static const QSet<QString> noUpdates {
235 const bool undo = !properties.isEmpty() &&
236 (properties.size() != 1 ||
261 setClearsRedoOnStart(
false);
262 this->enableJob(JOB_INIT,
true);
265 void initStrokeCallback()
override {
273 QScopedPointer<KUndo2Command> m_cmd;
float value(const T *src, size_t ch)
KisUndoAdapter * undoAdapter() const
void refreshGraphAsync(KisNodeSP root, const QVector< QRect > &rects, const QRect &cropRect, KisProjectionUpdateFlags flags=KisProjectionUpdateFlag::None) override
KisStrokeId startStroke(KisStrokeStrategy *strokeStrategy) override
void endStroke(KisStrokeId id) override
static const KoID selectionActive
static bool isStatelessProperty(const QString &id)
static const KoID layerError
static const KoID colorLabelIndex
static const KoID onionSkins
static const KoID passThrough
static const KoID alphaLocked
static const KoID openFileLayerFile
static const KoID visible
static const KoID colorizeNeedsUpdate
the base command for commands altering a node
The command for changing the property list of a layer.
bool mergeWith(const KUndo2Command *command) override
KisBaseNode::PropertyList m_newPropertyList
KisBaseNode::PropertyList m_oldPropertyList
static void setNodePropertiesAutoUndo(KisNodeSP node, KisImageSP image, PropertyList proplist)
KisNodePropertyListCommand(KisNodeSP node, KisBaseNode::PropertyList newPropertyList)
bool canAnnihilateWith(const KUndo2Command *other) const override
bool canMergeWith(const KUndo2Command *command) const override
void doUpdate(const KisBaseNode::PropertyList &oldPropertyList, const KisBaseNode::PropertyList &newPropertyList, const QRect &totalUpdateExtent)
static const QSet< QString > & propsWithNoUpdates()
virtual void addCommand(KUndo2Command *cmd)=0
KisSharedPtr< T > toStrongRef() const
toStrongRef returns a KisSharedPtr which may be dereferenced.
#define KIS_SAFE_ASSERT_RECOVER_NOOP(cond)
bool checkOnionSkinChanged(const KisBaseNode::PropertyList &oldPropertyList, const KisBaseNode::PropertyList &newPropertyList)
KUndo2MagicString kundo2_i18n(const char *text)
@ NodePropertyListCommandId
virtual PropertyList sectionModelProperties() const
virtual void setSectionModelProperties(const PropertyList &properties)
void setDirtyDontResetAnimationCache()
virtual KisAbstractProjectionPlaneSP projectionPlane() const