From 429382b7e57c81a34e7c7692979ce5a69ab3e1f4 Mon Sep 17 00:00:00 2001 From: foxydevloper <12120644+foxydevloper@users.noreply.github.com> Date: Tue, 20 Jul 2021 19:01:08 -0400 Subject: Fix hidden seperators when horizontal frames is 1 --- editor/plugins/sprite_frames_editor_plugin.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'editor/plugins') diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp index cd06fdc757..9bb8fbacbb 100644 --- a/editor/plugins/sprite_frames_editor_plugin.cpp +++ b/editor/plugins/sprite_frames_editor_plugin.cpp @@ -65,13 +65,11 @@ void SpriteFramesEditor::_sheet_preview_draw() { int x = i * width; split_sheet_preview->draw_line(Point2(x, 0), Point2(x, size.height), Color(1, 1, 1, a)); split_sheet_preview->draw_line(Point2(x + 1, 0), Point2(x + 1, size.height), Color(0, 0, 0, a)); - - for (int j = 1; j < v; j++) { - int y = j * height; - - split_sheet_preview->draw_line(Point2(0, y), Point2(size.width, y), Color(1, 1, 1, a)); - split_sheet_preview->draw_line(Point2(0, y + 1), Point2(size.width, y + 1), Color(0, 0, 0, a)); - } + } + for (int i = 1; i < v; i++) { + int y = i * height; + split_sheet_preview->draw_line(Point2(0, y), Point2(size.width, y), Color(1, 1, 1, a)); + split_sheet_preview->draw_line(Point2(0, y + 1), Point2(size.width, y + 1), Color(0, 0, 0, a)); } if (frames_selected.size() == 0) { -- cgit v1.2.3