From 7306a685f862b1a208706828bc2b2d069b48a318 Mon Sep 17 00:00:00 2001 From: David Capello Date: Wed, 5 Feb 2020 16:38:04 -0300 Subject: [PATCH] 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. --- laf | 2 +- src/app/context_flags.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/laf b/laf index c5c097547..60b2e83ce 160000 --- a/laf +++ b/laf @@ -1 +1 @@ -Subproject commit c5c097547a43a68708fbf8cccc5887213973080e +Subproject commit 60b2e83ce159a79368141c5386a764e16ede0c27 diff --git a/src/app/context_flags.cpp b/src/app/context_flags.cpp index 90db434a0..ea81294e5 100644 --- a/src/app/context_flags.cpp +++ b/src/app/context_flags.cpp @@ -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();