Skip to content

Commit

Permalink
City selection window: focus search text box
Browse files Browse the repository at this point in the history
Laying out controls seems to change the focus. Set it afterwards.
  • Loading branch information
lonemadmax authored and pulkomandy committed Jan 27, 2025
1 parent a00e433 commit 729916f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/CitiesListSelectionWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ CitiesListSelectionWindow::CitiesListSelectionWindow(BRect rect, BWindow* parent
fCityControl->SetToolTip(B_TRANSLATE("Enter location: city, country, region"));
fCityControl->SetModificationMessage(
new BMessage(kSearchMessage));
fCityControl->MakeFocus(true);

BButton* fButtonOk
= new BButton("ok", B_TRANSLATE("OK"), new BMessage(kSelectedCity));
Expand All @@ -169,6 +168,7 @@ CitiesListSelectionWindow::CitiesListSelectionWindow(BRect rect, BWindow* parent
.End()
.End();
fButtonOk->MakeDefault(true);
fCityControl->MakeFocus(true);

_StartSearch();
}
Expand Down

0 comments on commit 729916f

Please sign in to comment.