File indexing completed on 2024-12-22 04:10:02

0001 /*
0002  *  SPDX-FileCopyrightText: 2024 Dmitry Kazakov <dimula73@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #include "KisNotifySelectionChangedCommand.h"
0008 
0009 #include "kis_image.h"
0010 
0011 KisNotifySelectionChangedCommand::KisNotifySelectionChangedCommand(KisImageWSP image, State state)
0012     : KisCommandUtils::FlipFlopCommand(state)
0013     , m_image(image)
0014 {
0015 }
0016 void KisNotifySelectionChangedCommand::partB()
0017 {
0018     KisImageSP image = m_image.toStrongRef();
0019     KIS_SAFE_ASSERT_RECOVER_RETURN(image);
0020     image->notifySelectionChanged();
0021 }