Commit graph

197 commits

Author SHA1 Message Date
Rémi Verschelde a342131eba
Merge pull request #27673 from qarmin/small_fixes
Small fixes, mostly duplicated code
2019-04-22 12:00:34 +02:00
groud 14a901e88f Enhance tree scrolling when dragging 2019-04-12 21:58:48 +02:00
Juan Linietsky 9f4b5a91c0 Reorganized connection dialog for much improved ease of use.
-Removed dest path field
-Added a "Source" signal
-Added an "Advanced" button to hide complexity
-Fix bug on Tree to make sure "ensure visible" works on hidden trees
-Fix bug on TextEdit to ensure signals created with script not open sill focus the right line
2019-04-11 23:23:24 -03:00
Rémi Verschelde c8994b56f9 Style: Apply new changes from clang-format 8.0
It seems to stay compatible with formatting done by clang-format 6.0 and 7.0,
so contributors can keep using those versions for now (they will not undo those
changes).
2019-04-09 17:09:48 +02:00
qarmin 856a8226a5 Small fixes, mostly dupicated code 2019-04-08 11:03:37 +02:00
Rémi Verschelde fc370b3feb Fix -Wimplicit-fallthrough warnings from GCC 8
Adds `FALLTHROUGH` macro to specify when a fallthrough is intentional.
Can be replaced by `[[fallthrough]]` if/when we switch to C++17.

The warning is now enabled by default for GCC on `extra` warnings level
(part of GCC's `-Wextra`). It's not enabled in Clang's `-Wextra` yet,
but we could enable it manually once we switch to C++11. There's no
equivalent feature in MSVC for now.

Fixes #26135.
2019-04-05 15:14:53 +02:00
Juan Linietsky 5f079e2ef9 -Make tileset and meshlibrary edit in a separate inspector, fixes #26671
-Made relationship lines appear based on theme settings, not previous hack
-Fix drawing of relationship lines (was broken)
-Fix double initialization of theme settings
2019-03-06 12:12:42 -03:00
marxin 8d51618949 Add -Wshadow=local to warnings and fix reported issues.
Fixes #25316.
2019-02-20 19:44:12 +01:00
Rémi Verschelde 5fc86026ca Fix typos with codespell
Using codespell 1.14.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
doubleclick
lod
nd
numer
que
te
unselect
EOF
$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2019-02-13 09:23:29 +01:00
volzhs 1e603b706e Update rect size on select 2019-01-16 20:44:34 +09:00
Juan Linietsky 6af8b7c955 Defer activated signal after tree has been traversed. 2019-01-14 17:20:54 -03:00
Rémi Verschelde b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
volzhs 6a43f0a901 Draw relationship lines when its value is higher than 0 2018-12-25 09:18:18 +09:00
Guilherme Felipe 64e52f5bdb Fix tree item editable cell not updating when windows was resized 2018-12-14 12:09:47 -02:00
Ray Koopa fddffa9eb8 Unify editor class and reference search
Co-authored-by: Michael Alexsander Silva Dias <michaelalexsander@protonmail.com>
2018-11-20 20:52:27 -02:00
Juan Linietsky 0f7a86ca52 If using relationship lines (now default) hide guides. 2018-11-18 22:00:31 -03:00
K. S. Ernest (iFire) Lee 562d241b13 Fix creating a visual script virtual function after minimizing crashes #23536 2018-11-05 13:48:27 -08:00
M. Huri 967831d9a0 [Docs] Fixed 'get_button_count's link and a typo related to 'button'. 2018-10-13 17:34:57 +07:00
Fabio Alessandrelli e355a8fc4c Fix crash in Tree when moving using Joypad 2018-10-07 16:22:04 +02:00
Rémi Verschelde cdc411fd54 Fix various warnings: [-Waddress], [-Wpointer-arith], [-Wwrite-strings], [-Wreturn-local-addr] and more
Fixes the following GCC 5 warnings:
```
core/os/file_access.cpp:49:19: warning: the address of 'FileAccess::create_func' will always evaluate as 'true' [-Waddress]
servers/audio_server.cpp:192:70: warning: comparison with string literal results in unspecified behaviour [-Waddress]

drivers/gles2/rasterizer_storage_gles2.cpp:4095:90: warning: NULL used in arithmetic [-Wpointer-arith]

modules/gdnative/register_types.cpp:237:3: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
platform/android/export/export.cpp:207:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

modules/gdscript/gdscript.h:150:67: warning: returning reference to temporary [-Wreturn-local-addr]
servers/physics_2d/collision_object_2d_sw.h:119:56: warning: returning reference to temporary [-Wreturn-local-addr]
servers/physics_2d/collision_object_2d_sw.h:123:56: warning: returning reference to temporary [-Wreturn-local-addr]
servers/physics_2d/collision_object_2d_sw.h:127:50: warning: returning reference to temporary [-Wreturn-local-addr]
servers/physics_2d/collision_object_2d_sw.h:131:52: warning: returning reference to temporary [-Wreturn-local-addr]

editor/plugins/skeleton_editor_plugin.cpp:34:36: warning: extra tokens at end of #include directive
modules/bullet/bullet_types_converter.cpp:31:9: warning: #pragma once in main file

editor/import/editor_scene_importer_gltf.cpp:1996:51: warning: name lookup of 'i' changed
modules/visual_script/visual_script_property_selector.cpp:402:45: warning: name lookup of 'E' changed
scene/gui/tree.cpp:1268:25: warning: name lookup of 'i' changed
scene/resources/visual_shader.cpp:808:32: warning: name lookup of 'i' changed
```
2018-09-27 16:33:52 +02:00
Rémi Verschelde d8b30d42f5 Fix warnings for operator precedence disambiguation [-Wparentheses]
Fixes the following GCC 5 warnings:
```
core/io/resource_format_binary.cpp:1721:29: warning: suggest parentheses around arithmetic in operand of '|' [-Wparentheses]
core/typedefs.h:108:24: warning: suggest parentheses around comparison in operand of '!=' [-Wparentheses]
editor/plugins/spatial_editor_plugin.cpp:2202:58: warning: suggest parentheses around comparison in operand of '!=' [-Wparentheses]
editor/plugins/spatial_editor_plugin.cpp:5002:12: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]
main/input_default.cpp:346:59: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
main/input_default.cpp:348:60: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
main/input_default.cpp:579:57: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
modules/gridmap/grid_map_editor_plugin.cpp:613:14: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]
modules/theora/video_stream_theora.cpp:335:34: warning: suggest parentheses around '+' in operand of '&' [-Wparentheses]
modules/theora/video_stream_theora.cpp:336:35: warning: suggest parentheses around '+' in operand of '&' [-Wparentheses]
modules/visual_script/visual_script_property_selector.cpp:215:38: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
scene/gui/rich_text_label.cpp:424:84: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
scene/gui/rich_text_label.cpp:512:80: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
scene/gui/scroll_container.cpp:173:36: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
scene/gui/scroll_container.cpp:173:86: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
scene/gui/tree.cpp:1419:98: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
```
2018-09-27 10:29:48 +02:00
DualMatrix f483460e38 Removed obsoleted core/helper/value_evaluator.h and moved math_fieldwise to core/math/
Removed obsoleted core/helper/value_evaluator.h and moved math_fieldwise to core/math/
2018-09-23 14:58:15 +02:00
Rémi Verschelde 561a7772c6
Merge pull request #22198 from DualMatrix/input_was_eaten
Fixed ctrl+up/down shortcut no longer working in scene tree
2018-09-20 15:54:54 +02:00
DualMatrix f8ead1a2ee Fixed ctrl+up/down shortcut no longer working in scene tree
Fixed ctrl+up/down shortcut no longer working in scene tree.
2018-09-20 15:27:37 +02:00
Rémi Verschelde 1a16dabfb5
Merge pull request #21982 from luzpaz/misc-typos
Misc. typos
2018-09-13 10:59:00 +02:00
luz.paz 08bde5b2de Misc. typos
Found via `codespell -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"`
2018-09-12 21:39:17 -04:00
Rémi Verschelde 277b24dfb7 Make core/ includes absolute, remove subfolders from include path
This allows more consistency in the manner we include core headers,
where previously there would be a mix of absolute, relative and
include path-dependent includes.
2018-09-12 09:52:22 +02:00
Kelly Thomas 1dc8e7c05f Improve ClassDB information for some some signal parameters 2018-09-01 18:05:51 +08:00
Michael Alexsander Silva Dias 8c74257d68 Make "Search Classes" dialog have relationship lines if the setting is enabled 2018-08-31 21:48:56 -03:00
Hein-Pieter van Braam 0e29f7974b Reduce unnecessary COW on Vector by make writing explicit
This commit makes operator[] on Vector const and adds a write proxy to it.  From
now on writes to Vectors need to happen through the .write proxy. So for
instance:

Vector<int> vec;
vec.push_back(10);
std::cout << vec[0] << std::endl;
vec.write[0] = 20;

Failing to use the .write proxy will cause a compilation error.

In addition COWable datatypes can now embed a CowData pointer to their data.
This means that String, CharString, and VMap no longer use or derive from
Vector.

_ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug
builds. This is a lot faster for Vector in the editor and while running tests.
The reason why this difference used to exist is because force-inlined methods
used to give a bad debugging experience. After extensive testing with modern
compilers this is no longer the case.
2018-07-26 00:54:16 +02:00
Ibrahn Sahir fb32adfcf8 fixed a branch on uninitialised data in gui/tree
I don't think it was really causing any harm, but this makes things a
little more explicit and helps clean up valgrind output.
2018-07-13 14:00:10 +01:00
Rémi Verschelde fbc61374ca Use internal physics processing for Nodes' internal logic 2018-04-11 09:28:14 +02:00
Fabio Alessandrelli c531262190
Merge pull request #16947 from Faless/ui_actions
GUI elements ui_action usage, improvements
2018-03-16 20:55:11 +01:00
Hein-Pieter van Braam d702d7b335 Fix various valgrind reported uninitialized variable uses 2018-02-28 21:55:13 +01:00
Fabio Alessandrelli e3eb686906 Tree now uses UI actions instead of keys 2018-02-23 12:58:35 +01:00
Artem Varaksa d35e486228 Clean up some bad words from code comments 2018-02-17 16:00:39 +03:00
Rémi Verschelde 9f479f096c Fix typos in code and docs with codespell
Using v1.11.0 from https://github.com/lucasdemarchi/codespell
2018-01-18 22:01:42 +01:00
Bernhard Liebl 363980519c Fixes hangs with Tree in multi selection mode (issue 15588) 2018-01-13 17:34:12 +01:00
Bojidar Marinov 9b8e8b2220
Bind many more properties to scripts
Notable potentially breaking changes:
- PROPERTY_USAGE_NOEDITOR is now PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK, without PROPERTY_USAGE_INTERNAL
- Some properties were renamed, and sometimes even shadowed by new ones
- New getter methods (some virtual) were added
2018-01-12 00:58:14 +02:00
Bernhard Liebl 4cbe726cf5 Fix crash when calling tree API before NOTIFICATION_ENTER_TREE 2018-01-06 19:48:54 +01:00
Rémi Verschelde e4213e66b2 Add missing copyright headers and fix formatting
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
2018-01-05 01:22:23 +01:00
Rémi Verschelde 465d66be67
Merge pull request #15314 from poke1024/tree-rlines
Tree: only draw visible relationship lines
2018-01-04 10:33:55 +01:00
Bernhard Liebl e9aa6f2943 Tree: only draw visible relationship lines 2018-01-04 10:03:46 +01:00
firefly2442 f066991aa7 found via cppcheck:
remove code that will never run
make definition and declaration names for parameters match
change floats that were being set to bool values
remove pointer that is never used
2018-01-03 21:23:48 -07:00
Rémi Verschelde b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
yanorax 8627de2794 Fix TreeItem cell text alignment 2017-12-29 00:23:57 +11:00
Juan Linietsky 4a2eef4ad8 Removed the InputEvent ID field, which was unused and can cause bugs. 2017-12-26 09:49:31 -03:00
Ray Koopa a08c5d73a5 Add functionality to insert tree item. 2017-12-18 14:19:39 +01:00
Bernhard Liebl 3b79529cf2 Fix thin lines in editor gui on hidpi (issue 14691) 2017-12-15 18:49:48 +01:00
Dmitry Koteroff ad351a29db Some improvements to file/dir open/save dialogs:
1. Removed "..", instead you now will see "Select Current Folder" and "Select this Folder" buttons.
2. Added "go to parent folder" (^) button to Save a File dialog.
3. Tree.cpp: "nothing_selected" signal has been re-made (previous implementation, merged in #13308, wasn't optimal in context of performance)
4. Fixed issue in Project Export dialog: MODE_SAVE_FILE wasn't set when you click "Export".
5. Now you can deselect items by clicking on empty space in Open a Directory dialog.
2017-11-27 22:39:36 +01:00