Fix TextureProgressBar radial mode invalid polygon edge case
This commit is contained in:
parent
1ce6df7087
commit
7f6951b1f6
@ -537,6 +537,8 @@ void TextureProgressBar::_notification(int p_what) {
|
||||
uvs.push_back(uv);
|
||||
}
|
||||
|
||||
// Filter out an edge case where almost equal `from`, `to` were mapped to the same UV.
|
||||
if (points.size() >= 2) {
|
||||
Point2 center_point = get_relative_center();
|
||||
points.push_back(progress_offset + s * center_point);
|
||||
if (valid_atlas_progress) {
|
||||
@ -549,6 +551,7 @@ void TextureProgressBar::_notification(int p_what) {
|
||||
colors.push_back(tint_progress);
|
||||
draw_polygon(points, colors, uvs, progress);
|
||||
}
|
||||
}
|
||||
|
||||
// Draw a reference cross.
|
||||
if (Engine::get_singleton()->is_editor_hint()) {
|
||||
|
Loading…
Reference in New Issue
Block a user