File indexing completed on 2024-05-12 15:56:46
0001 /* 0002 * SPDX-FileCopyrightText: 2017 Dmitry Kazakov <dimula73@gmail.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #include "KoSelectedShapesProxySimple.h" 0008 0009 #include "kis_assert.h" 0010 #include <KoShapeManager.h> 0011 #include <KoSelection.h> 0012 0013 KoSelectedShapesProxySimple::KoSelectedShapesProxySimple(KoShapeManager *shapeManager) 0014 : m_shapeManager(shapeManager) 0015 { 0016 KIS_ASSERT_RECOVER_RETURN(m_shapeManager); 0017 0018 connect(m_shapeManager.data(), SIGNAL(selectionChanged()), SIGNAL(selectionChanged())); 0019 connect(m_shapeManager.data(), SIGNAL(selectionContentChanged()), SIGNAL(selectionContentChanged())); 0020 connect(m_shapeManager->selection(), SIGNAL(currentLayerChanged(const KoShapeLayer*)), SIGNAL(currentLayerChanged(const KoShapeLayer*))); 0021 } 0022 0023 KoSelection *KoSelectedShapesProxySimple::selection() 0024 { 0025 KIS_ASSERT_RECOVER_RETURN_VALUE(m_shapeManager, 0); 0026 return m_shapeManager->selection(); 0027 } 0028