1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Revert "Fixes the selection rect in item_list drawn not clipped"

This commit is contained in:
Rémi Verschelde
2017-10-31 10:58:53 +01:00
committed by GitHub
parent 91adb58d3d
commit a1ffadb953

View File

@@ -781,7 +781,9 @@ void ItemList::_notification(int p_what) {
} }
if (has_focus()) { if (has_focus()) {
VisualServer::get_singleton()->canvas_item_add_clip_ignore(get_canvas_item(), true);
draw_style_box(get_stylebox("bg_focus"), Rect2(Point2(), size)); draw_style_box(get_stylebox("bg_focus"), Rect2(Point2(), size));
VisualServer::get_singleton()->canvas_item_add_clip_ignore(get_canvas_item(), false);
} }
if (shape_changed) { if (shape_changed) {
@@ -1427,6 +1429,7 @@ ItemList::ItemList() {
allow_rmb_select = false; allow_rmb_select = false;
icon_scale = 1.0f; icon_scale = 1.0f;
set_clip_contents(true);
} }
ItemList::~ItemList() { ItemList::~ItemList() {