nanogui icon indicating copy to clipboard operation
nanogui copied to clipboard

Multiple small improvements

Open mkupchik opened this issue 1 year ago • 1 comments

TextArea::draw() checks there's a selected area before drawing highlighted background. However, there's a duplicate condition m_selection_end != Vector2i(-1) in this check, presumably due to a typo. Let's do this check properly, using the same rules as in TextArea::keyboard_event().

As TextArea::m_selectable field is a bool, it makes sense for TextArea::is_selectable() and TextArea::set_selectable() methods to return and accept bool.

Also it's enough to clear m_tab_offsets once in TabWidgetBase::perform_layout().

mkupchik avatar Mar 12 '24 18:03 mkupchik