Commit 0d95e890 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Move slotShowPopupPalette() to KisCanvas2

parent 0e35f5fa
......@@ -852,5 +852,14 @@ KoGuidesData *KisCanvas2::guidesData()
return &m_d->view->document()->guidesData();
}
void KisCanvas2::slotShowPopupPalette(const QPoint &p)
{
if (!m_d->popupPalette) {
return;
}
m_d->popupPalette->showPopupPalette(p);
}
#include "kis_canvas2.moc"
......@@ -221,6 +221,7 @@ private slots:
public:
bool isPopupPaletteVisible();
void slotShowPopupPalette(const QPoint& = QPoint(0,0));
// interafce for KisCanvasController only
void setWrapAroundViewingMode(bool value);
......
......@@ -386,7 +386,7 @@ Qt::Key KisInputManager::Private::workaroundShiftAltMetaHell(const QKeyEvent *ke
bool KisInputManager::Private::tryHidePopupPalette()
{
if (canvas->isPopupPaletteVisible()) {
canvas->favoriteResourceManager()->slotShowPopupPalette();
canvas->slotShowPopupPalette();
return true;
}
return false;
......
......@@ -55,5 +55,5 @@ void KisShowPaletteAction::begin(int, QEvent *event)
pos = inputManager()->canvas()->canvasWidget()->mapFromGlobal(QCursor::pos());
}
inputManager()->canvas()->favoriteResourceManager()->slotShowPopupPalette(pos);
inputManager()->canvas()->slotShowPopupPalette(pos);
}
......@@ -81,17 +81,6 @@ QStringList KisFavoriteResourceManager::favoritePresetList()
return m_favoritePresetsList;
}
//Popup Palette
void KisFavoriteResourceManager::slotShowPopupPalette(const QPoint &p)
{
if (!m_popupPalette) {
return;
}
else {
m_popupPalette->showPopupPalette(p);
}
}
QList<QImage> KisFavoriteResourceManager::favoritePresetImages()
{
QList<QImage> images;
......
......@@ -104,7 +104,6 @@ signals:
void sigChangeFGColorSelector(const QColor&);
public slots:
void slotShowPopupPalette(const QPoint& = QPoint(0,0));
void slotChangeActivePaintop(int);
/*update the priority of a colour in m_colorList, used only by m_popupPalette*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment