aboutsummaryrefslogtreecommitdiff
path: root/src/ui/render
diff options
context:
space:
mode:
authorYuqian Yang <crupest@crupest.life>2025-11-16 10:22:07 +0800
committerYuqian Yang <crupest@crupest.life>2025-11-16 10:22:07 +0800
commitd7fbe9332f01153efaea40e7a35f0025c75b9a04 (patch)
tree83cace7d4edba6453ed4749efa96921272085796 /src/ui/render
parent246eb9266b9349b44cbe96f3f839124ab30cbb89 (diff)
downloadcru-d7fbe9332f01153efaea40e7a35f0025c75b9a04.tar.gz
cru-d7fbe9332f01153efaea40e7a35f0025c75b9a04.tar.bz2
cru-d7fbe9332f01153efaea40e7a35f0025c75b9a04.zip
Abstract out AutoDestruct.
Diffstat (limited to 'src/ui/render')
-rw-r--r--src/ui/render/TextRenderObject.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/ui/render/TextRenderObject.cpp b/src/ui/render/TextRenderObject.cpp
index 18020032..c7803383 100644
--- a/src/ui/render/TextRenderObject.cpp
+++ b/src/ui/render/TextRenderObject.cpp
@@ -187,8 +187,7 @@ void TextRenderObject::Draw(platform::graphics::IPainter* painter) {
}
if (this->selection_range_.has_value()) {
- const auto&& rects =
- text_layout_->TextRangeRect(this->selection_range_.value());
+ const auto&& rects = text_layout_->TextRangeRect(*this->selection_range_);
for (const auto& rect : rects)
painter->FillRectangle(rect, this->GetSelectionBrush().get());
}