Skip to content

Failed to redo multiple properties changed within 500 ms #10628

Open

Description

@norihiro

Operating System Info

Other

Other OS

Fedora 39

OBS Studio Version

Git

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/OfCsYcwx0uh1X3UJ

OBS Studio Crash Log URL

No response

Expected Behavior

After the steps to reproduce,
Left = 1, Top = 0

Current Behavior

Left = 1, Top = 2

Steps to Reproduce

  1. Add a Crop/Pad filter to a source.
  2. Set Left = 1, Top = 2 within 500 ms. (You need to type fast enough.)
  3. Close the dialog.
  4. Open the filter dialog again.
  5. Undo twice by hitting Ctrl+Z.
  6. Redo once by hitting Ctrl+Shift+Z.

Anything else we should know?

Added blog to see what was pushed into the undo/redo stack.

diff --git a/UI/window-basic-filters.cpp b/UI/window-basic-filters.cpp
index fcab696d6..6e4171a61 100644
--- a/UI/window-basic-filters.cpp
+++ b/UI/window-basic-filters.cpp
@@ -209,11 +209,13 @@ void FilterChangeUndoRedo(void *vp, obs_data_t *nd_old_settings,
        obs_data_set_string(redo_wrapper, "uuid", source_uuid);
        obs_data_set_string(redo_wrapper, "settings",
                            obs_data_get_json(new_settings));
+       blog(LOG_INFO, "redo_wrapper: settings: %s", obs_data_get_string(redo_wrapper, "settings"));
 
        OBSDataAutoRelease undo_wrapper = obs_data_create();
        obs_data_set_string(undo_wrapper, "uuid", source_uuid);
        obs_data_set_string(undo_wrapper, "settings",
                            obs_data_get_json(nd_old_settings));
+       blog(LOG_INFO, "undo_wrapper: settings: %s", obs_data_get_string(undo_wrapper, "settings"));
 
        auto undo_redo = [](const std::string &data) {
                OBSDataAutoRelease dat =

The log shows as below. The first redo_wrapper has the settings {"left":1,"top":2} where it is expected to {"left":1,"top":0}.

17:51:42.018: redo_wrapper: settings: {"left":1,"top":2,"right":0,"bottom":0}
17:51:42.018: undo_wrapper: settings: {"left":0,"top":0,"right":0,"bottom":0}
17:51:42.510: redo_wrapper: settings: {"left":1,"top":2,"right":0,"bottom":0}
17:51:42.510: undo_wrapper: settings: {"left":1,"top":0,"right":0,"bottom":0}

Activity

  1. norihiro commented on May 1, 2024

    @norihiro
    ContributorAuthor

    This bug was found during writing the RFC obsproject/rfcs#61.

  2. changed the title [-]Failed to redo multiple property change within 500 ms[/-] [+]Failed to redo multiple properties changed within 500 ms[/+] on May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions