Skip to content

Commit 8717435

Browse files
committed
Add an owned child version of addScrolledChild to ScrolledFrame.
1 parent 3141d10 commit 8717435

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

visage_ui/scroll_bar.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,12 @@ namespace visage {
116116

117117
void addScrolledChild(Frame* frame, bool make_visible = true) {
118118
container_.setVisible(true);
119-
container_.addChild(frame);
120-
frame->setVisible(make_visible);
119+
container_.addChild(frame, make_visible);
120+
}
121+
122+
void addScrolledChild(std::unique_ptr<Frame> frame, bool make_visible = true) {
123+
container_.setVisible(true);
124+
container_.addChild(std::move(frame), make_visible);
121125
}
122126

123127
bool scrollUp() {

0 commit comments

Comments
 (0)