Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++
916 B
Raw Blame
/*
 *  SPDX-FileCopyrightText: 2017 Dmitry Kazakov <[email protected]>
 *
 *  SPDX-License-Identifier: GPL-2.0-or-later
 */

#include "KoSelectedShapesProxySimple.h"

#include "kis_assert.h"
#include <KoShapeManager.h>
#include <KoSelection.h>

KoSelectedShapesProxySimple::KoSelectedShapesProxySimple(KoShapeManager *shapeManager)
    : m_shapeManager(shapeManager)
{
    KIS_ASSERT_RECOVER_RETURN(m_shapeManager);

    connect(m_shapeManager.data(), SIGNAL(selectionChanged()), SIGNAL(selectionChanged()));
    connect(m_shapeManager.data(), SIGNAL(selectionContentChanged()), SIGNAL(selectionContentChanged()));
    connect(m_shapeManager->selection(), SIGNAL(currentLayerChanged(const KoShapeLayer*)), SIGNAL(currentLayerChanged(const KoShapeLayer*)));
}

KoSelection *KoSelectedShapesProxySimple::selection()
{
    KIS_ASSERT_RECOVER_RETURN_VALUE(m_shapeManager, 0);
    return m_shapeManager->selection();
}