Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
pitivi
pitivi
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 198
    • Issues 198
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 27
    • Merge Requests 27
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GNOME
  • pitivipitivi
  • Issues
  • #2022

Closed
Open
Opened Apr 01, 2017 by bugzilla-migration@bugzilla-migrationReporter

Many undoable actions when changing the text of a title clip

Submitted by Alex Băluț @aleb

Link to original bug (#7738)

Description

Type to edit the text of a title clip, notice for each letter you type an UndoableAction is created.

This happens because each time the text field is changed, a "changed" signal is emitted which is handled by _textChangedCb in titleeditor.py, which calls self._setChildProperty("text", text), which adds a new operation to the undoable-action-log.

An operation is something which can be un-done or re-done. It is composed of actions which record various changes, for example when moving a clip from one layer to another at a different position, this operation would be the change of the clip position and the change of the original layer (clip removal), and the change of the new layer (clip addition).

We already have a mechanism for squashing "actions", it can be seen in TestPropertyChangedAction.test_expand in test_undo.py.

A new mechanism should be created which allows squashing operations. For example UndoableActionLog.begin() could have a new optional parameter: squash=False, and when it's set to True and the name of the operation is the same as the previous one, the last operation is reactivated to be edited.

Your work should start by adding a unittest.

While at it, as a preparatory commit, rename "action group" and "transaction" to "operation" in the undo*.py files and the corresponding test_undo*.py files.

Edited Jan 05, 2019 by Alexandru Băluț
Assignee
Assign to
2021.01
Milestone
2021.01
Assign milestone
Time tracking
None
Due date
None
Reference: GNOME/pitivi#2022