File indexing completed on 2024-12-22 04:10:04
0001 /* 0002 * SPDX-FileCopyrightText: 2021 Dmitry Kazakov <dimula73@gmail.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #include "KisUpdateCommandEx.h" 0008 0009 #include "kis_image_interfaces.h" 0010 #include "kis_node.h" 0011 0012 KisUpdateCommandEx::KisUpdateCommandEx(KisBatchNodeUpdateSP updateData, 0013 KisUpdatesFacade *updatesFacade, 0014 State state, 0015 QWeakPointer<boost::none_t> blockUpdatesCookie) 0016 : FlipFlopCommand(state), 0017 m_updateData(updateData), 0018 m_blockUpdatesCookie(blockUpdatesCookie), 0019 m_updatesFacade(updatesFacade) 0020 { 0021 } 0022 0023 KisUpdateCommandEx::~KisUpdateCommandEx() 0024 { 0025 } 0026 0027 KisUpdateCommandEx::KisUpdateCommandEx(KisBatchNodeUpdateSP updateData, KisUpdatesFacade *updatesFacade, State state) 0028 : KisUpdateCommandEx(updateData, updatesFacade, state, QWeakPointer<boost::none_t>()) 0029 { 0030 } 0031 0032 void KisUpdateCommandEx::partB() { 0033 if (m_blockUpdatesCookie) return; 0034 0035 for (auto it = m_updateData->begin(); it != m_updateData->end(); ++it) { 0036 m_updatesFacade->refreshGraphAsync(it->first, it->second); 0037 } 0038 }