Commit Graph

13540 Commits

Author SHA1 Message Date
DualMatrix 7624e1009a Fixed !is_inside_tree() errors in file dialog
Fixed !is_inside_tree() errors appearing when current_file has a . in it.

(cherry picked from commit 2b13938459)
2019-07-03 13:57:37 +02:00
Rémi Verschelde 7586957720 Export dialog: Fix error color and link alignment
Also fix extraneous "- " line when there are more than 2 messages.

(cherry picked from commit 5542d4a830)
2019-07-03 13:56:28 +02:00
Hein-Pieter van Braam 68d09255bd Call minimum_size_changed() in PopupMenu::remove_item()
When removing an item from a PopupMenu we need to update the control's
size cache otherwise the size of the PopupMenu itself lags behind by 1
item size. Meaning the PopupMenu will remain too large.

(cherry picked from commit 2d032c1562)
2019-07-03 13:56:06 +02:00
Hein-Pieter van Braam e4733c5fc4 Delay emitting pressed signals in PopupMenu
When processing items we may actually delete the item we're processing
in the callback for the signal. To avoid this, call the signal after
we're done processing the items. But before hiding the popupmenu itself.

Thanks to @reduz for writing the whole solution.

This fixes #19842

(cherry picked from commit fa7eac8a0d)
2019-07-03 13:55:23 +02:00
Hein-Pieter van Braam 5e25f40d83 Replace XRaiseWindow with a _NET_ACTIVE_WINDOW ClientRequest
This fixes the editor on X11 not getting put on the foreground when a
debugged project hits an error or breakpoint.

(cherry picked from commit 827cadafc8)
2019-07-03 13:53:55 +02:00
Teashrock f7aaf161fb Fixed absent variable exception while trying to raise another exception.
(cherry picked from commits 51a0a38135
and 695b8d254e)
2019-07-03 13:48:46 +02:00
Thomas ten Cate 2e34a922f0 Reset caret blink when Ctrl+moving the cursor
There was a hardcoded exception to never reset caret blinking if Ctrl
(`command`) was pressed. This broke on Ctrl+arrows,
Ctrl+Home/End/PgUp/PgDn, Ctrl+C, Ctrl+V, Ctrl+Backspace and Ctrl+Delete.

Resetting blink only for those Ctrl operations that actually touch the
cursor somehow would clutter the code a lot, so I removed the check
entirely. That means we now also reset blinking on unrelated operations
like Ctrl+O, but that seems pretty harmless. I actually like the
additional bit of feedback even in that case (most of these will
immediately defocus the editor anyway, so you never see it).

Fixes #18100

(cherry picked from commit 44d761e55c)
2019-07-03 13:35:41 +02:00
Nick Hope d3b67bde8a fixed: windows mono compile (#20598)
tidy: formatting.

(cherry picked from commit 24b4694313)
2019-07-03 13:35:41 +02:00
Marcin Zawiejski 771f1fe5c1 Fix Windows handles leak
Fixes thread and process handles leak when running and killing project
from editor (caused by a missing CloseHandle call) plus a potential leak
when calling OS_Windows::execute with p_blocking and !r_pipe.

The leak could be easily observed with a Handles counter in Task Manager
(or Performance Monitor) for the Godot editor process.

(cherry picked from commit b1e0da455b)
2019-07-03 13:35:41 +02:00
Swarnim Arun 209c6164f4 Fix Visual Script duplicate issue
(cherry picked from commit b893dc2028)
2019-07-03 13:35:41 +02:00
Chaosus 92fb290f69 Added conversions between matrixes in shaders
(cherry picked from commit ca0a6c3fca)
2019-07-03 13:35:41 +02:00
Chaosus d2bf31bdad Fix crash when you pass invalid parameter to ImageTexture.set_data
(cherry picked from commit bde962dbdd)
2019-07-03 13:35:41 +02:00
K. S. Ernest (iFire) Lee ff35310650 Bones are now named and their parents are correct.
(cherry picked from commit ac541f5d16)
2019-07-03 13:35:41 +02:00
Rémi Verschelde 005d1c8901 Fix loading PO files with missing newline after last msgstr
Fixes #20375.

(cherry picked from commit 12d69ef53e)
2019-07-03 13:35:41 +02:00
Ibrahn Sahir 112075b3ad correctly close handle in alsa audio driver.
(cherry picked from commit 3e85e89dc5)
2019-07-03 13:35:41 +02:00
Marcelo Fernandez 5c69f83c96 Fix possible crash at NativeScript::get_base_script
(cherry picked from commit 77f3c0b495)
2019-07-03 13:35:41 +02:00
Rémi Verschelde 754514df7e Shader lang: Properly assign INSTANCE_ID to gl_InstanceID
Note that gl_InstanceID is not supported in OpenGL ES 2.0,
so in the gles2 backend we assign it to 0.

Also clean up some duplicates/commented out code.
Fixes #20088.

(cherry picked from commit 00dfc9c8eb)
2019-07-03 13:35:41 +02:00
Marcelo Fernandez 0572b52ba1 Fix upper/lower case convertion for characters >= 0x80
(cherry picked from commit ecb071b221)
2019-07-03 13:35:41 +02:00
karroffel f302888a47 fix nameclash with MSVC
(cherry picked from commit 43ae1c712f)
2019-07-03 13:23:41 +02:00
Rémi Verschelde 392d988228 Export: Properly reload preset when opening dialog
Fixes #20119 where newly installed templates were not detected.

Also fix a bug with preset deletion where it would attempt to
edit an already removed preset. For this I made it so that
ItemList::deselect_all() also resets `current` to -1, as a manual
ItemList::deselect(idx) already does.

(cherry picked from commit 13239cd4cc)
2019-07-03 13:23:10 +02:00
matthew1006 c68a465f47 Fixed OS.has_feature not using custom feature tags.
(cherry picked from commit 25e64ffa20)
2019-07-03 13:21:56 +02:00
volzhs fd5dca2689 Fix copying ttf, otf by DND to editor
regression from d65ac7378c

(cherry picked from commit 4bb85b70e1)
2019-07-03 13:09:18 +02:00
Yar-Mukhamedov 47c7bfd678 Fix export templates installation error...
(cherry picked from commit bf37bd94b6)
2019-07-03 13:08:44 +02:00
Overblob 854fc3cb97 Fixed error due to bad cursor handling when parsing shader code
Fixed completion error log thrown on "no auto-completion found" for typings with no completion.

(cherry picked from commit 7a74d310aa)
2019-07-03 13:07:45 +02:00
Ibrahn Sahir 33a93311ec fix scrollbar icons with atlas texture.
Draw scrollbar icons through their textures, rather than calling
directly to the server. Allows atlas textures to manipulate the source
rect as required.

(cherry picked from commit e51a94905d)
2019-07-03 13:07:12 +02:00
Ibrahn Sahir b890ed527b fixed branch on uninit and data race in editor android device polling
Initialised relevant variables before stating thread,
to prevent a branch on uninitialised data.
Fixed race condition in polling that could miss a device change.

(cherry picked from commit fe4265ad46)
2019-07-03 13:06:46 +02:00
karroffel 4b69ed4124 fix wrong loop condition in MultiMesh allocation
(cherry picked from commit 3d33da19bd)
2019-07-03 13:04:56 +02:00
Saracen 493e220ab9 Fix bits_per_pixel validation in BMP and TGA loader modules.
(cherry picked from commit 115f6d14a0)
2019-07-03 13:02:45 +02:00
Juan Linietsky 16e6d6fede Don't post process on tiny render targets, fixes #19628
(cherry picked from commit a78b42c058)
2019-07-03 13:01:53 +02:00
Josh Taylor b1bb7e48ca Changed minimum visible viewport size
When the viewport's size.y becomes lower than 2, the storage->frame.current_rt->effects.mip_maps[0].sizes Vector during rendering becomes empty, resulting in crashes in at least GLES3. This is a temporary fix to stop rendering a viewport when its size is below 2 rather than below 1.

(cherry picked from commit 892a4b175a)
2019-07-03 13:01:02 +02:00
Will Nations f4db382c50 Fix underline_meta not working in RichTextLabel
(cherry picked from commit a9ea06e73a)
2019-07-03 12:43:24 +02:00
Yasha Borevich f17983e9cf Fix memory leak in GDScript during infinnity loops with yields
(cherry picked from commit 30317296af)
2019-07-03 12:42:41 +02:00
matthew1006 dae30964a2 Fixed project settings overrides not using custom feature tags.
(cherry picked from commit 1844704c20)
2019-07-03 12:41:27 +02:00
Duy-Nguyen Ta f27c989829 bugfix: correct #ifdef for TOUCH_ENABLED and OPENGL_ENABLED
(cherry picked from commit 25ad5f8a35)
2019-07-03 12:40:34 +02:00
bruvzg 042a74a696 [macOS] Allow using user provided `.icns` files for exported app icons.
(cherry picked from commit 22ee26849e)
2019-07-03 12:33:25 +02:00
bruvzg 56a82b473e Fix macOS icon export (add 1024px PNG icon and 32px/16px RLE icons).
(cherry picked from commit 56b26c4369)
2019-07-03 12:33:25 +02:00
Marcelo Fernandez deef878f6f Add missing NULL checks for add_child_below_node
(cherry picked from commit 8c1c7ff131)
2019-07-03 12:33:25 +02:00
Marcelo Fernandez fab378abf5 Fix profiler not updating on realtime
(cherry picked from commit 34045051d2)
2019-07-03 12:33:25 +02:00
Rémi Verschelde a41f7579c8 Fix property hint for ReflectionProbe extents
(cherry picked from commit 2fabb81318)
2019-07-03 12:33:25 +02:00
Emmanuel Leblond 3808544891 [Pluginscript] Fix not working exports in editor
(cherry picked from commit 380b85a32f)
2019-07-03 12:33:25 +02:00
Rémi Verschelde 69f08cd2cc Fix shortcuts using KEY_MASK_CTRL instead of KEY_MASK_CMD
KEY_MASK_CMD is automatically replaced by KEY_MASK_CTRL on non-OSX
and KEY_MASK_META (Command key) on OSX, so it should be used for all
Ctrl/Cmd + key shortcuts.

Also de-hacked the macOS shortcut replacements with proper conditional
definition. Not tested on macOS, cannot judge if they are good shortcuts.

Fixes #10761.

(cherry picked from commit 3f09cac267)
2019-07-03 12:33:25 +02:00
Oliver Rausch 2107517f2f Fix return type of isnan and isinf in the shader language
(cherry picked from commit 2368b31e1e)
2019-07-03 12:33:25 +02:00
Fabian 82e54db588 Fix for not picking up locale of some .po translation files
(cherry picked from commit 1065f06eef)
2019-07-03 12:33:25 +02:00
Webster Sheets 793a205ae1 Revert #14753, as it is buggy and no longer necessary.
(cherry picked from commit 1198662b2b)
2019-07-03 12:33:25 +02:00
George Marques a5a9d887da Fix positive operator in GDScript compiler
(cherry picked from commit 3cec24baa8)
2019-07-03 12:33:25 +02:00
volzhs 12458ebe8c Fix updating mesh when reimporting
(cherry picked from commit 9d5e1228ea)
2019-07-03 12:33:25 +02:00
Chaosus 367bec2010 Fix bug in CubeMesh
(cherry picked from commit b3fccc5778)
2019-07-03 12:33:24 +02:00
Marcelo Fernandez f85b2a62f7 Fix missing return on Navigation2D::get_closest_point_owner
(cherry picked from commit b9023715e2)
2019-07-03 12:33:24 +02:00
nemerle 13a90fdd89 Fix PoolAllocator::resize for too large p_new_size
The code had a subtle signed/unsigned bug -
```cpp
if( signed - unsigned < 0)
// signed - unsigned is unsigned in c++, so
if( unsigned < 0)
// and thus the if block will never be executed
```

Thus all the following code would be ran, including unnecessary retries
of compacting the pool.

(cherry picked from commit 2bbe6144ff)
2019-07-03 12:33:24 +02:00
Bojidar Marinov 761bfb156d Fix a corner-case bug in _copy_texscreen in the gles3 renderer
Fixes #17698

(cherry picked from commit ee52d12921)
2019-07-03 12:33:24 +02:00