mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-23 13:20:50 +00:00
Fix progress bar applying filters (fix #2152)
Regression introduced in 4264f199cdf398659fd90db4c572f42c47fd5988
This commit is contained in:
parent
ccb9dc6f25
commit
1659401642
@ -1990,9 +1990,10 @@ void Editor::onPaint(ui::PaintEvent& ev)
|
||||
// Editor with sprite
|
||||
else {
|
||||
try {
|
||||
// Lock the sprite to read/render it. We wait 1/4 secs in case
|
||||
// the background thread is making a backup.
|
||||
DocReader documentReader(m_document, 250);
|
||||
// Lock the sprite to read/render it. Here we don't wait if the
|
||||
// document is locked (e.g. a filter is being applied to the
|
||||
// sprite) to avoid locking the UI.
|
||||
DocReader documentReader(m_document, 0);
|
||||
|
||||
// Draw the sprite in the editor
|
||||
renderChrono.reset();
|
||||
@ -2030,8 +2031,9 @@ void Editor::onPaint(ui::PaintEvent& ev)
|
||||
}
|
||||
}
|
||||
catch (const LockedDocException&) {
|
||||
// The sprite is locked to be read, so we can draw an opaque
|
||||
// background only.
|
||||
// The sprite is locked, so we cannot render it, we can draw an
|
||||
// opaque background now, and defer the rendering of the sprite
|
||||
// for later.
|
||||
g->fillRect(theme->colors.editorFace(), rc);
|
||||
defer_invalid_rect(g->getClipBounds().offset(bounds().origin()));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user