9#include <klocalizedstring.h>
27 return qobject_cast<KisLayer*>(node.
data());
32 const QRect &updateRect)
33 : m_image(image), m_updateRect(updateRect)
45 if (!m_removedNodeParent)
return;
49 int index = m_removedNodeIndex;
51 while ((node = m_removedNodeParent->
at(index)) && !
isLayer(node)) {
56 index = qMax(0, m_removedNodeIndex - 1);
58 while ((node = m_removedNodeParent->
at(index)) && !
isLayer(node)) {
69 m_removedNodeParent->setDirty(m_updateRect);
KisNodeSP m_removedNodeParent
UpdateTarget(KisImageWSP image, KisNodeSP removedNode, const QRect &updateRect)
KisImageCommand(const KUndo2MagicString &name, KisImageWSP image, KUndo2Command *parent=0)
~KisImageCommand() override
void refreshGraphAsync(KisNodeSP root, const QVector< QRect > &rects, const QRect &cropRect, KisProjectionUpdateFlags flags=KisProjectionUpdateFlag::None) override
KisSharedPtr< T > toStrongRef() const
toStrongRef returns a KisSharedPtr which may be dereferenced.
#define KIS_ASSERT_RECOVER_RETURN(cond)
static bool isLayer(KisNodeSP node)
int index(const KisNodeSP node) const
KisNodeSP at(quint32 index) const