Skip to content

Commit

Permalink
Resize the watch window whenever something gets added / removed
Browse files Browse the repository at this point in the history
  • Loading branch information
ninjamuffin99 committed Sep 16, 2024
1 parent 32d4c35 commit a4bea51
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions flixel/system/debug/watch/Watch.hx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class Watch extends Window
var entry = new WatchEntry(displayName, data, removeEntry);
entries.push(entry);
entriesContainer.addChild(entry);
resetEntries();
updateSize();
}

public function remove(displayName:String, data:WatchEntryData):Void
Expand All @@ -102,7 +102,7 @@ class Watch extends Window
entries.fastSplice(entry);
entriesContainer.removeChild(entry);
entry.destroy();
resetEntries();
updateSize();
}

public function removeAll():Void
Expand All @@ -114,7 +114,7 @@ class Watch extends Window
entry.destroy();
}
entries.splice(0, entries.length);
resetEntries();
updateSize();
}

override public function update():Void
Expand All @@ -125,9 +125,9 @@ class Watch extends Window

override function updateSize():Void
{
resetEntries();
minSize.setTo(getMaxMinWidth() + entriesContainerOffset.x, entriesContainer.height + entriesContainerOffset.y);
super.updateSize();
resetEntries();
}

function resetEntries():Void
Expand Down

0 comments on commit a4bea51

Please sign in to comment.