Change error checking in `duplicate_signals()` to check for path to
`p_original`, thus adhering to the method used in `duplicate`, instead
of checking for ownership.
Configured for a max line length of 120 characters.
psf/black is very opinionated and purposely doesn't leave much room for
configuration. The output is mostly OK so that should be fine for us,
but some things worth noting:
- Manually wrapped strings will be reflowed, so by using a line length
of 120 for the sake of preserving readability for our long command
calls, it also means that some manually wrapped strings are back on
the same line and should be manually merged again.
- Code generators using string concatenation extensively look awful,
since black puts each operand on a single line. We need to refactor
these generators to use more pythonic string formatting, for which
many options are available (`%`, `format` or f-strings).
- CI checks and a pre-commit hook will be added to ensure that future
buildsystem changes are well-formatted.
(cherry picked from commit cd4e46ee65)
The crash happens further down when setting an invalid owner in
`Node::_set_owner_nocheck` but I couldn't figure out how to fix it.
But here the proper fix is to catch the invalid scene file early on
and fail loading it.
Part of #17372.
(cherry picked from commit c080ec5da2)
`get_char_size()` is a public virtual function defined in the `Font`
class. Implementations exist for both `BitmapFont` and `Dynamic Font`.
However, it was only exposed to the GDScript API through the Bitmap
Font, and not for Dynamic Font.
This commit exposes the function through `Font` instead.
Fixes#23967
(cherry picked from commit a4413710f9)
The specific case for object reference seems unnecessary, as `RES res = var`
already does the work. The case where REF is invalid is never hit in the case
of already freed objects.
The assignment `res = *r` was causing the resource to be always invalidated
on the 3.2 branch.
(cherry picked from commit 12685df423)
* On press left+command+shift or right+command+shift it should behave like shift+home or shift+end and select the text
* Using home and end events as reference
(cherry picked from commit d8f8a3c606)
This reverts commit bf1cc116e1.
This needs more discussion to avoid breaking some users' expectations.
See #38086 for arguments.
(cherry picked from commit 69f36cea8c)
Skew is x-axis only, because it must be bidirectionally convertible to a 2x3 matrix, but you can subtract it to the rotation to get the effect on y-axis
(cherry picked from commit efb1f7d76b)
(cherry picked from commit 38085f2f6982c491935a434bb45e358dbebe1714)
(cherry picked from commit b9c280b73ff6a13ea490d2da0f2728bcef3038dc)
(cherry picked from commit 895ed2aed7)
Calls to set_amount can increase the size of the particle array, but do not zero the memory, they only set the active flag to false. This uninitialized memory can be sent to the GPU, possibly as NaNs.
RichTextEffect can now have a bbcode string starting like one of the built-in.
It was impossible before as the built-in would take precedence over the custom effect that has the same bbcode start.
Example : [fade] would take precedence over [fade_in]
(cherry picked from commit b4e3042cba)
The stack size of the undo history of a TextEdit was not limited leading
to potential memory leaks when doing lots of operations on a TextEdit.
This commit adds the option gui/common/text_edit_undo_stack_max_size
to the project settings. The first element of the undo stack is popped
if the stack's size exceeds this value ensuring limited memory usage.
The default stack size setting is 1024.
Fixes#37838.
(cherry picked from commit 4a82390aaf)