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

Move the resetPopupPaletteParent method to KisCanvas2

parent 685fee11
......@@ -175,8 +175,8 @@ void KisCanvas2::setCanvasWidget(QWidget * widget)
{
KisAbstractCanvasWidget *tmp = dynamic_cast<KisAbstractCanvasWidget*>(widget);
Q_ASSERT_X(tmp, "setCanvasWidget", "Cannot cast the widget to a KisAbstractCanvasWidget");
if (m_d->favoriteResourceManager != 0) {
m_d->favoriteResourceManager->resetPopupPaletteParent(widget);
if (m_d->popupPalette) {
m_d->popupPalette->setParent(widget);
}
if(m_d->canvasWidget!=0)
......@@ -390,8 +390,8 @@ void KisCanvas2::createCanvas(bool useOpenGL)
#endif
createQPainterCanvas();
}
if (m_d->favoriteResourceManager) {
m_d->favoriteResourceManager->resetPopupPaletteParent(m_d->canvasWidget->widget());
if (m_d->popupPalette) {
m_d->popupPalette->setParent(m_d->canvasWidget->widget());
}
}
......
......@@ -92,13 +92,6 @@ void KisFavoriteResourceManager::slotShowPopupPalette(const QPoint &p)
}
}
void KisFavoriteResourceManager::resetPopupPaletteParent(QWidget* w)
{
if (m_popupPalette) {
m_popupPalette->setParent(w);
}
}
QList<QImage> KisFavoriteResourceManager::favoritePresetImages()
{
QList<QImage> images;
......
......@@ -56,7 +56,6 @@ public:
/************************************Popup Palette************************************/
void showPaletteManager();
void resetPopupPaletteParent(QWidget * = 0);
QList<QImage> favoritePresetImages();
......
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