Fix timeline is not repainted/invalidated when we switch onion skin option (F3 key) (fix #3806)

This commit is contained in:
Gaspar Capello 2023-05-16 14:30:08 -03:00
parent 9a915355c5
commit 398ca95392
2 changed files with 4 additions and 0 deletions

View File

@ -388,6 +388,8 @@ void Timeline::updateUsingEditor(Editor* editor)
m_firstFrameConn = Preferences::instance().document(m_document)
.timeline.firstFrame.AfterChange.connect([this]{ invalidate(); });
m_onionskinConn = docPref.onionskin.AfterChange.connect([this]{ invalidate(); });
setFocusStop(true);
regenerateRows();
setViewScroll(view->timelineScroll());
@ -400,6 +402,7 @@ void Timeline::detachDocument()
m_confPopup->closeWindow(nullptr);
m_firstFrameConn.disconnect();
m_onionskinConn.disconnect();
if (m_document) {
m_thumbnailsPrefConn.disconnect();

View File

@ -424,6 +424,7 @@ namespace app {
std::unique_ptr<ConfigureTimelinePopup> m_confPopup;
obs::scoped_connection m_ctxConn1, m_ctxConn2;
obs::connection m_firstFrameConn;
obs::connection m_onionskinConn;
// Marching ants stuff to show the range in the clipboard.
// TODO merge this with the marching ants of the sprite editor (ui::Editor)