Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to redo multiple properties changed within 500 ms #10628

Open
norihiro opened this issue May 1, 2024 · 1 comment
Open

Failed to redo multiple properties changed within 500 ms #10628

norihiro opened this issue May 1, 2024 · 1 comment

Comments

@norihiro
Copy link
Contributor

norihiro commented May 1, 2024

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}
@norihiro
Copy link
Contributor Author

norihiro commented May 1, 2024

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

@norihiro norihiro changed the title Failed to redo multiple property change within 500 ms Failed to redo multiple properties changed within 500 ms May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant