This changes the return type for getting the filter index from a
size_t to an int. This makes it easier for developers to use,
as an invalid index just returns a -1.
This fixes the shortcuts not showing up in the filters context
menu for rename and remove. This also has a code cleanup for
the rename action, as now it is created in the ui file.
Expands the filter_compatible check to return false if the source isn't
async and the filter is not an audio filter, filtering out e.g. the
"Video Delay (Async)" filter from browser sources (which have audio but
don't have async video).
Amends 845e056551.
Deleting a filter will trigger a visibility change, which will also
trigger a focus change if the focus has not been on the list itself
(e.g. after interacting with the property view).
When an async filter list is available in the view, it will be the first
candidate to receive focus. If this list is empty, we hide the property
view by default and set the view to a `nullptr`.
When the call for the visibility change returns, we need to check for
this possibility, as another event might have hidden (and deleted) the
view already.
window-basic-properties was written in the earliest days of OBS. To
make it easier to navigate & adjust, this moves all the structural
code into a new .ui file and out of the C++ code.
This also modifies the ButtonBox in Filters to use matching buttons.
Updates the filters window to use a QSplitter layout for the properties area.
The handle is disabled for audio filter windows. The handle and property area are hidden when there are no filters.
When the filter view is created, the first item of the asyncFilters list
would be selected (if the source supports asyncFilters) and have its
properties shown.
This means that when no items were in the asyncFilters list, no
properties would be shown, even if an effect filter was present.
Adds a check to focus the effectFilters list in case there are only
effect filters, which makes the correct properties appear.
This reverts commit f832d14220.
Reverting this until we do more investigation. Currently, any text
that can be typed in a dialog requires the dialog to re-enable hotkeys
on destruction, which is frustrating. There has to be a better way.
Disable hotkeys when a user starts an interaction with the UI where they
are expected to type text and re-enable hotkeys when the interaction is
completed.
The undo/redo functions are setting the current scene. Everytime
it would do this, it would actually transition to the scene.
This forces the current scene, so it fixes a bug where the
transition would be grayed out when undoing/redoing.
Implements undo/redo for both properties and filters. Works by creating
a new callback that gets called to save undo/redo states after a timer
is fired. Also disabled undo/redo until the actions have completed to
prevent a user from being able to disrupt the stack by perfoming actions
before others have finished.
Speeds up loading with large number of filters and prevents deadlock by
not getting the properties of filters during
OBSBasicFilters::UpdateFilters() which uses the source->filter_mutex