[pitivi] timeline: Disables Add Layer till project is loaded



commit 4bb62bb334ee88828ff67510a9c04b8feadf4bfd
Author: Aryan Kaushik <73686-Aryan20 users noreply gitlab gnome org>
Date:   Sun Apr 10 08:14:21 2022 +0000

    timeline: Disables Add Layer till project is loaded
    
    Fixes #2590

 pitivi/timeline/timeline.py | 1 +
 tests/test_undo_timeline.py | 1 +
 2 files changed, 2 insertions(+)
---
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index 095358b9e..a53d430e1 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -1662,6 +1662,7 @@ class TimelineContainer(Gtk.Grid, Zoomable, Loggable):
         self.paste_action.set_enabled(can_paste)
         self.keyframe_action.set_enabled(selection_non_empty)
         project_loaded = bool(self._project)
+        self.add_layer_action.set_enabled(project_loaded)
         self.backward_one_frame_action.set_enabled(project_loaded)
         self.forward_one_frame_action.set_enabled(project_loaded)
         self.backward_one_second_action.set_enabled(project_loaded)
diff --git a/tests/test_undo_timeline.py b/tests/test_undo_timeline.py
index 4c3546a2d..409aa8706 100644
--- a/tests/test_undo_timeline.py
+++ b/tests/test_undo_timeline.py
@@ -379,6 +379,7 @@ class TestLayerObserver(common.TestCase):
         clip = GES.TitleClip()
         self.layer.add_clip(clip)
 
+        self.timeline_container.update_actions()
         self.timeline_container.add_layer_action.activate()
 
         layers = self.timeline.get_layers()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]