Skip to content

Fix small graphical bug when dragging cels (fix #5216)#5471

Merged
dacap merged 1 commit into
aseprite:mainfrom
Gasparoken:fix-cel
Oct 22, 2025
Merged

Fix small graphical bug when dragging cels (fix #5216)#5471
dacap merged 1 commit into
aseprite:mainfrom
Gasparoken:fix-cel

Conversation

@Gasparoken

Copy link
Copy Markdown
Member

No description provided.

@aseprite-bot aseprite-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

Comment thread src/app/ui/timeline/timeline.cpp Outdated
case Range::kCels: {
gfx::Rect outlineBounds(dropBounds);
outlineBounds.enlarge(outlineWidth());
int s = outlineWidth();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: variable 's' of type 'int' can be declared 'const' [misc-const-correctness]

Suggested change
int s = outlineWidth();
int const s = outlineWidth();

@aseprite-bot aseprite-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

return rc;
}

gfx::Rect Timeline::getPartBounds(const Hit& hit) const

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: function 'getPartBounds' is within a recursive call chain [misc-no-recursion]

gfx::Rect Timeline::getPartBounds(const Hit& hit) const
                    ^
Additional context

src/app/ui/timeline/timeline.cpp:3205: example recursive call chain, starting from function 'getSelectedFramesBounds'

gfx::Rect Timeline::getSelectedFramesBounds(const Range& range) const
                    ^

src/app/ui/timeline/timeline.cpp:3209: Frame #1: function 'getSelectedFramesBounds' calls function 'getPartBounds' here:

    rc |= getPartBounds(Hit(PART_HEADER_FRAME, 0, col_t(frame)));
          ^

src/app/ui/timeline/timeline.cpp:3139: Frame #2: function 'getPartBounds' calls function 'getRangeBounds' here:

      return getOutlinedRangeBounds(getRangeBounds(m_range));
                                    ^

src/app/ui/timeline/timeline.cpp:3240: Frame #3: function 'getRangeBounds' calls function 'getSelectedFramesBounds' here:

    case Range::kFrames: return getSelectedFramesBounds(range);
                                ^

src/app/ui/timeline/timeline.cpp:3240: ... which was the starting point of the recursive call chain; there may be other cycles

    case Range::kFrames: return getSelectedFramesBounds(range);
                                ^

@aseprite-bot

Copy link
Copy Markdown
Collaborator

clang-tidy review says "All clean, LGTM! 👍"

@Gasparoken Gasparoken linked an issue Oct 15, 2025 that may be closed by this pull request
@aseprite-bot

Copy link
Copy Markdown
Collaborator

clang-tidy review says "All clean, LGTM! 👍"

@martincapello martincapello left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great! 🚀

@Gasparoken Gasparoken assigned dacap and unassigned martincapello Oct 17, 2025
@dacap dacap merged commit df80d4d into aseprite:main Oct 22, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Small graphical bug when dragging cells

4 participants