Skip to content

Commit

Permalink
Merge pull request #72983 from katemonster33/imgui_popup_default_option
Browse files Browse the repository at this point in the history
Fixed issue where ImGui popup does not correctly set the default option
  • Loading branch information
Maleclypse authored Apr 15, 2024
2 parents 2716469 + f3a4314 commit 065774f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/popup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@ query_popup &query_popup::cursor( size_t pos )
{
// Change does not affect cache, do not invalidate window
cur = pos;
std::shared_ptr<query_popup_impl> impl = p_impl.lock();
if( impl ) {
impl->keyboard_selected_option = short( cur );
}
return *this;
}

Expand Down Expand Up @@ -384,6 +388,7 @@ std::shared_ptr<query_popup_impl> query_popup::create_or_get_impl()
p_impl = impl = std::make_shared<query_popup_impl>( this );
if( impl ) {
impl->mark_resized();
impl->keyboard_selected_option = short( cur );
}
}
return impl;
Expand Down

0 comments on commit 065774f

Please sign in to comment.