Commit d6a762c3 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Don't store a local pointer to the fav resource manager in kiscanvas2

parent 4cba068e
......@@ -83,14 +83,12 @@ public:
, monitorProfile(0)
, currentCanvasIsOpenGL(false)
, toolProxy(new KisToolProxy(parent))
, favoriteResourceManager(0)
, vastScrolling(true)
, popupPalette(0)
{
}
~KisCanvas2Private() {
delete favoriteResourceManager;
delete shapeManager;
delete toolProxy;
}
......@@ -107,7 +105,6 @@ public:
int openGLFilterMode;
#endif
KisToolProxy *toolProxy;
KisFavoriteResourceManager *favoriteResourceManager;
#ifdef HAVE_OPENGL
KisOpenGLImageTexturesSP openGLImageTextures;
#endif
......@@ -797,11 +794,7 @@ QPoint KisCanvas2::documentOffset() const
void KisCanvas2::setFavoriteResourceManager(KisFavoriteResourceManager* favoriteResourceManager)
{
m_d->favoriteResourceManager = favoriteResourceManager;
m_d->popupPalette = new KisPopupPalette(m_d->favoriteResourceManager, m_d->canvasWidget->widget());
m_d->favoriteResourceManager->setPopupPalette(m_d->popupPalette);
m_d->popupPalette = new KisPopupPalette(favoriteResourceManager, m_d->canvasWidget->widget());
}
void KisCanvas2::setCursor(const QCursor &cursor)
......
......@@ -308,6 +308,7 @@ KisPaintopBox::~KisPaintopBox()
// Do not delete the widget, since it it is global to the application, not owned by the view
m_presetsPopup->setPaintOpSettingsWidget(0);
qDeleteAll(m_paintopOptionWidgets);
delete m_favoriteResourceManager;
}
void KisPaintopBox::updatePaintops(const KoColorSpace* colorSpace)
......
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