virtualx-engine/editor
Tan Wang Leng ee2f406c73 Fix wrong guideline values shown during dragging
Suppose that the user wants to use some guidelines in 2D mode. The
user has enabled "Use Pixel Snap", and configured the "Grid Step" to
1px.

On some zoom levels, when dragging the guidelines step by step, some
offsets shows the wrong value. The offsets that are wrong vary - it is
affected by the zoom level, so some zoom levels do not display this
problem.

For example, a user may see this while dragging the guideline:

0px   1px   1px   3px   4px   5px   5px   7px   8px

whereby 2px and 6px are missing.

This is due to a floating-point error. The values are printed as
(truncated) integers, but they are actually decimals, so they were
actually 1.9999 and 5.9999 for the missing cases.

Let's fix that by rounding up the values before printing them to get rid
of the errors.

This fixes #35010.
2020-01-24 23:52:43 +08:00
..
collada Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
doc Add settings from SceneTree in the documentation 2020-01-22 22:37:56 +02:00
fileserver Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
icons Add an icon for OGG samples 2020-01-15 22:32:08 +01:00
import Remove unused #if 0'ed code 2020-01-21 21:41:54 +01:00
plugins Fix wrong guideline values shown during dragging 2020-01-24 23:52:43 +08:00
translations i18n: Sync translations with Weblate 2020-01-23 23:19:54 +01:00
animation_bezier_editor.cpp Remove unused #if 0'ed code 2020-01-21 21:41:54 +01:00
animation_bezier_editor.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
animation_track_editor.cpp Fixes leak in Animation Track editor 2020-01-24 11:17:56 +08:00
animation_track_editor.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
animation_track_editor_plugins.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
animation_track_editor_plugins.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
array_property_edit.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
array_property_edit.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
audio_stream_preview.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
audio_stream_preview.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
code_editor.cpp Fix typos with codespell 2020-01-15 00:49:52 +01:00
code_editor.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
connections_dialog.cpp Refactor (and fix) how the connect button is disabled. 2020-01-16 12:35:41 +01:00
connections_dialog.h Refactor (and fix) how the connect button is disabled. 2020-01-16 12:35:41 +01:00
create_dialog.cpp Add ignoring of disabled recent and favorite classes in create 2020-01-09 08:17:06 +01:00
create_dialog.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
dependency_editor.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
dependency_editor.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
dictionary_property_edit.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
dictionary_property_edit.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_about.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_about.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_asset_installer.cpp Makes more strings translatable 2020-01-04 13:46:38 +08:00
editor_asset_installer.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_atlas_packer.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_atlas_packer.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_audio_buses.cpp fix audio buses editor not save, close #26683 2020-01-19 10:56:00 +08:00
editor_audio_buses.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_autoload_settings.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_autoload_settings.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_builders.py Some small fixes to warnings in python scripts 2019-07-11 22:26:04 +05:30
editor_data.cpp Don't copy script with copy params 2020-01-09 06:34:47 +09:00
editor_data.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_dir_dialog.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_dir_dialog.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_export.cpp Export: Improve usability of command line interface 2020-01-07 14:25:56 +01:00
editor_export.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_feature_profile.cpp Add ignoring of disabled recent and favorite classes in create 2020-01-09 08:17:06 +01:00
editor_feature_profile.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_file_dialog.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_file_dialog.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_file_system.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_file_system.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_folding.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_folding.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_fonts.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_fonts.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_help.cpp show parametric setters and getters in editor help 2020-01-17 15:10:59 +05:30
editor_help.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_help_search.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_help_search.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_inspector.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_inspector.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_layouts_dialog.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_layouts_dialog.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_log.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_log.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_network_profiler.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_network_profiler.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_node.cpp Export: Properly disable resource preview thread 2020-01-14 11:34:02 +01:00
editor_node.h Export: Properly disable resource preview thread 2020-01-14 11:34:02 +01:00
editor_path.cpp Clip text in EditorPath button to avoid dock size changes 2020-01-20 14:25:27 -03:00
editor_path.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_plugin.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_plugin.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_plugin_settings.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_plugin_settings.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_profiler.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_profiler.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_properties.cpp Use int64_t for EditorPropertyInteger and warn when out of double range 2020-01-15 23:39:49 -05:00
editor_properties.h Use int64_t for EditorPropertyInteger and warn when out of double range 2020-01-15 23:39:49 -05:00
editor_properties_array_dict.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_properties_array_dict.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_resource_preview.cpp Export: Properly disable resource preview thread 2020-01-14 11:34:02 +01:00
editor_resource_preview.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_run.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_run.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_run_native.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_run_native.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_run_script.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_run_script.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_scale.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_scale.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_sectioned_inspector.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_sectioned_inspector.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_settings.cpp Enable the script editor line length guideline by default 2020-01-02 21:47:44 +01:00
editor_settings.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_spin_slider.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_spin_slider.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_sub_scene.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_sub_scene.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_themes.cpp Only create the editor theme once 2020-01-19 21:51:21 +01:00
editor_themes.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_vcs_interface.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
editor_vcs_interface.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
export_template_manager.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
export_template_manager.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
file_type_cache.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
file_type_cache.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
filesystem_dock.cpp Fixes a memory leak in FileSystemDock 2020-01-15 21:45:13 +01:00
filesystem_dock.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
find_in_files.cpp Fixes leak in Find in Files utility 2020-01-21 08:47:59 +08:00
find_in_files.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
groups_editor.cpp Trims user provided group name 2020-01-10 16:08:47 +08:00
groups_editor.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
import_dock.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
import_dock.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
inspector_dock.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
inspector_dock.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
multi_node_edit.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
multi_node_edit.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
node_dock.cpp Clip text in NodeDock toolbuttons to prevent dock size changes 2020-01-21 10:23:09 +01:00
node_dock.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
pane_drag.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
pane_drag.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
plugin_config_dialog.cpp Make script made via plugin creation obey syntax settings 2020-01-21 02:05:56 -03:00
plugin_config_dialog.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
progress_dialog.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
progress_dialog.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
project_export.cpp Export: Fix leak or orphaned Controls after #34911 2020-01-08 17:45:10 +01:00
project_export.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
project_manager.cpp Use a loading placeholder for project icons in the project manager 2020-01-21 22:56:19 +01:00
project_manager.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
project_settings_editor.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
project_settings_editor.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
property_editor.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
property_editor.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
property_selector.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
property_selector.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
pvrtc_compress.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
pvrtc_compress.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
quick_open.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
quick_open.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
register_exporters.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
rename_dialog.cpp Only create the editor theme once 2020-01-19 21:51:21 +01:00
rename_dialog.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
reparent_dialog.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
reparent_dialog.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
run_settings_dialog.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
run_settings_dialog.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
scene_tree_dock.cpp Fix error when closing Attach Node Script window 2020-01-02 12:31:31 +01:00
scene_tree_dock.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
scene_tree_editor.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
scene_tree_editor.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
script_create_dialog.cpp Add option to disable loading scripts in ScriptCreateDialog 2020-01-09 13:09:23 -03:00
script_create_dialog.h Add option to disable loading scripts in ScriptCreateDialog 2020-01-09 13:09:23 -03:00
script_editor_debugger.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
script_editor_debugger.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
SCsub SCons: Fix uses of [].append instead of env.add_source_files() 2019-07-22 15:08:32 +02:00
settings_config_dialog.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
settings_config_dialog.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
spatial_editor_gizmos.cpp Remove unused #if 0'ed code 2020-01-21 21:41:54 +01:00
spatial_editor_gizmos.h Remove unused #if 0'ed code 2020-01-21 21:41:54 +01:00