Skip to content

Commit

Permalink
Cleanup some unecessary editor/ includes in scene/
Browse files Browse the repository at this point in the history
Part of godotengine#29730, handles false positives.
  • Loading branch information
akien-mga committed Jun 12, 2019
1 parent f410e7a commit 84d969a
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
3 changes: 2 additions & 1 deletion scene/2d/camera_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@
/*************************************************************************/

#include "camera_2d.h"

#include "core/engine.h"
#include "core/math/math_funcs.h"
#include "scene/scene_string_names.h"
#include "servers/visual_server.h"
#include <editor/editor_node.h>

void Camera2D::_update_scroll() {

Expand Down
10 changes: 5 additions & 5 deletions scene/gui/control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,23 @@
/*************************************************************************/

#include "control.h"
#include "core/project_settings.h"
#include "scene/main/canvas_layer.h"
#include "scene/main/viewport.h"
#include "servers/visual_server.h"

#include "core/message_queue.h"
#include "core/os/keyboard.h"
#include "core/os/os.h"
#include "core/print_string.h"
#include "core/project_settings.h"
#include "scene/gui/label.h"
#include "scene/gui/panel.h"
#include "scene/main/canvas_layer.h"
#include "scene/main/viewport.h"
#include "scene/scene_string_names.h"
#include "servers/visual_server.h"

#ifdef TOOLS_ENABLED
#include "editor/editor_settings.h"
#include "editor/plugins/canvas_item_editor_plugin.h"
#endif
#include <stdio.h>

Dictionary Control::_edit_get_state() const {

Expand Down
9 changes: 8 additions & 1 deletion scene/gui/gradient_edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,17 @@
/*************************************************************************/

#include "gradient_edit.h"

#include "core/os/keyboard.h"
#include "editor/editor_scale.h"

#ifdef TOOLS_ENABLED
#include "editor/editor_scale.h"
#define SPACING (3 * EDSCALE)
#define POINT_WIDTH (8 * EDSCALE)
#else
#define SPACING 3
#define POINT_WIDTH 8
#endif

GradientEdit::GradientEdit() {
grabbed = -1;
Expand Down
2 changes: 0 additions & 2 deletions scene/gui/gradient_edit.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
#include "scene/resources/default_theme/theme_data.h"
#include "scene/resources/gradient.h"

#define POINT_WIDTH (8 * EDSCALE)

class GradientEdit : public Control {

GDCLASS(GradientEdit, Control);
Expand Down
2 changes: 1 addition & 1 deletion scene/gui/tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include "scene/main/viewport.h"

#ifdef TOOLS_ENABLED
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#endif

#include <limits.h>
Expand Down

0 comments on commit 84d969a

Please sign in to comment.