Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 3f2d2b0e authored by Dmitry Kazakov's avatar Dmitry Kazakov

Fix update of the timeline after canvas mode is switched

When switching from QPainter to openGL canvas, the model
should be notified about the frame cache change
parent d7e0a611
......@@ -573,9 +573,9 @@ void KisCanvas2::connectCurrentCanvas()
}
startResizingImage();
emit imageChanged(image);
setLodAllowedInCanvas(m_d->lodAllowedInImage);
emit sigCanvasEngineChanged();
}
void KisCanvas2::resetCanvas(bool useOpenGL)
......
......@@ -225,7 +225,7 @@ public: // KisCanvas2 methods
QRect renderingLimit() const;
Q_SIGNALS:
void imageChanged(KisImageWSP image);
void sigCanvasEngineChanged();
void sigCanvasCacheUpdated();
void sigContinueResizeImage(qint32 w, qint32 h);
......
......@@ -106,7 +106,7 @@ void TimelineDocker::setCanvas(KoCanvasBase * canvas)
KisShapeController *kritaShapeController = dynamic_cast<KisShapeController*>(doc->shapeController());
m_d->model->setDummiesFacade(kritaShapeController, m_d->canvas->image());
m_d->model->setFrameCache(m_d->canvas->frameCache());
slotUpdateFrameCache();
m_d->model->setAnimationPlayer(m_d->canvas->animationPlayer());
m_d->model->setNodeManipulationInterface(
......@@ -124,7 +124,11 @@ void TimelineDocker::setCanvas(KoCanvasBase * canvas)
m_d->canvasConnections.addConnection(
m_d->canvas->viewManager()->mainWindow(), SIGNAL(themeChanged()),
this, SLOT(slotUpdateIcons()) );
this, SLOT(slotUpdateIcons()));
m_d->canvasConnections.addConnection(
m_d->canvas, SIGNAL(sigCanvasEngineChanged()),
this, SLOT(slotUpdateFrameCache()));
}
}
......@@ -136,6 +140,11 @@ void TimelineDocker::slotUpdateIcons()
}
}
void TimelineDocker::slotUpdateFrameCache()
{
m_d->model->setFrameCache(m_d->canvas->frameCache());
}
void TimelineDocker::unsetCanvas()
{
setCanvas(0);
......
......@@ -43,6 +43,7 @@ public:
public Q_SLOTS:
void slotUpdateIcons();
void slotUpdateFrameCache();
private:
struct Private;
......
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