-
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