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 (changedInTheMeantime.size() == 1 &&
158 const QRect &totalUpdateExtent)
164 if (oldPropertyList == newPropertyList) {
168 bool oldPassThroughValue =
false;
169 bool newPassThroughValue =
false;
171 bool oldVisibilityValue =
false;
172 bool newVisibilityValue =
false;
176 oldPassThroughValue = prop.
state.toBool();
179 oldVisibilityValue = prop.
state.toBool();
185 newPassThroughValue = prop.
state.toBool();
188 newVisibilityValue = prop.
state.toBool();
192 if (oldPassThroughValue && !newPassThroughValue) {
198 }
else if ((
m_node->
parent() && !oldPassThroughValue && newPassThroughValue) ||
199 (oldPassThroughValue && newPassThroughValue &&
200 !oldVisibilityValue && newVisibilityValue)) {
216 static const QSet<QString> noUpdates {
232 const bool undo = !properties.isEmpty() &&
233 (properties.size() != 1 ||
258 setClearsRedoOnStart(
false);
259 this->enableJob(JOB_INIT,
true);
262 void initStrokeCallback()
override {
270 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 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