VisualBuilder: Pressing the Tab key when there are no widgets is a no-op.

This commit is contained in:
Andreas Kling 2019-04-16 23:17:14 +02:00
parent ef8c613737
commit 428cae7864
Notes: sideshowbarker 2024-07-19 14:40:54 +09:00

View File

@ -108,9 +108,11 @@ void VBForm::grabber_mousedown_event(GMouseEvent& event, VBWidget& widget, Direc
void VBForm::keydown_event(GKeyEvent& event)
{
if (event.key() == KeyCode::Key_Tab) {
if (!m_selected_widget && !m_widgets.is_empty()) {
set_selected_widget(m_widgets.first());
update();
if (!m_selected_widget) {
if (!m_widgets.is_empty()) {
set_selected_widget(m_widgets.first());
update();
}
return;
} else {
int selected_widget_index = 0;