• Harish Fulara's avatar
    timeline: Fix pasting copied clips multiple times · d092f674
    Harish Fulara authored
    How copy-paste works? The object (o_copy) returned by the copy function
    stores reference to the object (o_orig) whose copy is made. While
    pasting o_copy onto the timeline, this reference is used to set the
    timeline for o_copy, i.e., timeline(o_copy) = timeline(o_orig), which
    makes o_copy get pasted on the timeline.
    
    Issue with previous logic? We were saving a copy of 'self.__copiedGroup'
    before pasting it onto the timeline and then restoring
    'self.__copiedGroup' from previously saved copy after the paste
    operation is done (for the first time). This saving and restoring
    'self.__copiedGroup' would make it store a reference to itself. When we
    paste again (for the second time) on the timeline, no timeline would be
    associated with the pasted object because 'self.__copiedGroup' refers to
    itself and there is no timeline associated with 'self.__copiedGroup'.
    Hence, nothing would get pasted onto the timeline.
    
    Fixes https://phabricator.freedesktop.org/T7639
    d092f674
Name
Last commit
Last update
..
plugins Loading commit data...
samples Loading commit data...
test-encoding-targets/test Loading commit data...
validate-tests Loading commit data...
__init__.py Loading commit data...
common.py Loading commit data...
meson.build Loading commit data...
ptv_testsuite.py Loading commit data...
test_application.py Loading commit data...
test_check.py Loading commit data...
test_clipproperties.py Loading commit data...
test_common.py Loading commit data...
test_custom_effect_ui.py Loading commit data...
test_effects.py Loading commit data...
test_log.py Loading commit data...
test_mainwindow.py Loading commit data...
test_media_library.py Loading commit data...
test_misc.py Loading commit data...
test_pipeline.py Loading commit data...
test_plugin_manager.py Loading commit data...
test_prefs.py Loading commit data...
test_preset.py Loading commit data...
test_previewers.py Loading commit data...
test_project.py Loading commit data...
test_render.py Loading commit data...
test_settings.py Loading commit data...
test_shortcuts.py Loading commit data...
test_system.py Loading commit data...
test_timeline_elements.py Loading commit data...
test_timeline_layer.py Loading commit data...
test_timeline_timeline.py Loading commit data...
test_undo.py Loading commit data...
test_undo_project.py Loading commit data...
test_undo_timeline.py Loading commit data...
test_utils.py Loading commit data...
test_utils_timeline.py Loading commit data...
test_widgets.py Loading commit data...