Commit bb7c3213 authored by Jürg Billeter's avatar Jürg Billeter
Browse files

element.py: Defer workspace.prepared setting in case of pending commands

parent 024d584d
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -2075,8 +2075,13 @@ class Element(Plugin):
            self.prepare(sandbox)

            if workspace:
                def mark_workspace_prepared():
                    workspace.prepared = True

                # Defer workspace.prepared setting until pending batch commands
                # have been executed.
                sandbox._callback(mark_workspace_prepared)

    def __is_cached(self, keystrength):
        if keystrength is None:
            keystrength = _KeyStrength.STRONG if self._get_context().get_strict() else _KeyStrength.WEAK