Fix random bug showing disabled menu items right-clicking the timeline

When the backup thread is running, the upgradeToWrite() needed some
extra time to lock the document to check if we can write or not in the
sprite. Now we just check the ability to write the sprite with the new
RWLock::canWriteLockFromRead() function.
This commit is contained in:
David Capello 2020-02-05 16:38:04 -03:00
parent 28969d968c
commit 7306a685f8
2 changed files with 3 additions and 3 deletions

2
laf

@ -1 +1 @@
Subproject commit c5c097547a43a68708fbf8cccc5887213973080e
Subproject commit 60b2e83ce159a79368141c5386a764e16ede0c27

View File

@ -1,5 +1,5 @@
// Aseprite
// Copyright (C) 2019 Igara Studio S.A.
// Copyright (C) 2019-2020 Igara Studio S.A.
// Copyright (C) 2001-2018 David Capello
//
// This program is distributed under the terms of
@ -45,7 +45,7 @@ void ContextFlags::update(Context* context)
updateFlagsFromSite(site);
if (document->upgradeToWrite(0))
if (document->canWriteLockFromRead())
m_flags |= ActiveDocumentIsWritable;
document->unlock();