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

Handle unordered add / position change events #1555

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Dec 23, 2021

  1. Handle unordered add / position change events

    Fixes (some cases of) plugins ignoring saved `(x, y)` coordinates when a
    project is loaded. The canvas can get notified of a plugin's position
    before the plugin is actually added, so when the plugin is actually it
    just goes to the default position.
    
    This happens because `PatchbayClientPositionChanged` events can arrive
    before `PatchbayClientAdded` events, as seen in debug logs like this:
    
    ```
    ...
    PatchCanvas::joinGroup(30)
    PatchCanvas::joinGroup(30) - unable to find groups to join
    PatchCanvas::setGroupPos(30, 1118, 591, 0, 0)
    PatchCanvas::setGroupPos(30, 1118, 591, 0, 0) - unable to find group to reposition
    PatchCanvas::addGroup(30, b'Audio to CV', SPLIT_UNDEF, ICON_PLUGIN)
    ...
    ```
    
    If this happens, the canvas box will be placed in the default position,
    rather than obeying the `PatchbayClientPositionChanged` signal. This PR
    keeps track of missed events and then applies them once the object is
    actually added.
    StefansM committed Dec 23, 2021
    Configuration menu
    Copy the full SHA
    40ce12f View commit details
    Browse the repository at this point in the history