7#include <klocalizedstring.h>
27 QSet<QString> changedIds;
47 if (prop.
state != valueForId(prop.
id, list2)) {
48 changedIds.insert(prop.
id);
60 m_newPropertyList(newPropertyList),
61 m_oldPropertyList(node->sectionModelProperties())
74 if (changed.isEmpty())
return;
88 if (changed.isEmpty())
return;
113 const QSet<QString> changedInTheMeantime =
117 (changedInTheMeantime.size() == 1 &&
156 const QRect &totalUpdateExtent)
162 if (oldPropertyList == newPropertyList) {
166 bool oldPassThroughValue =
false;
167 bool newPassThroughValue =
false;
169 bool oldVisibilityValue =
false;
170 bool newVisibilityValue =
false;
174 oldPassThroughValue = prop.
state.toBool();
177 oldVisibilityValue = prop.
state.toBool();
183 newPassThroughValue = prop.
state.toBool();
186 newVisibilityValue = prop.
state.toBool();
190 if (oldPassThroughValue && !newPassThroughValue) {
196 }
else if ((
m_node->
parent() && !oldPassThroughValue && newPassThroughValue) ||
197 (oldPassThroughValue && newPassThroughValue &&
198 !oldVisibilityValue && newVisibilityValue)) {
214 static const QSet<QString> noUpdates {
230 const bool undo = !properties.isEmpty() &&
256 setClearsRedoOnStart(
false);
257 this->enableJob(JOB_INIT,
true);
260 void initStrokeCallback()
override {
268 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 const KoID layerError
static const KoID colorLabelIndex
static const KoID onionSkins
static const KoID passThrough
static const KoID alphaLocked
static const KoID colorOverlay
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