sculpt: fix focus between inspect and file edit

Issue #5174
This commit is contained in:
Norman Feske 2024-04-16 11:33:14 +02:00 committed by Christian Helmuth
parent 8319f047d2
commit e1ab69491c
2 changed files with 4 additions and 1 deletions

View File

@ -48,7 +48,7 @@ struct Sculpt::Keyboard_focus
target = UNDEFINED; target = UNDEFINED;
if (_panel.inspect_tab_visible()) if (_panel.inspect_tab_selected() || _panel.files_tab_selected())
target = WM; target = WM;
if ((_popup.state == Popup::VISIBLE) && _popup_dialog.keyboard_needed()) if ((_popup.state == Popup::VISIBLE) && _popup_dialog.keyboard_needed())

View File

@ -35,6 +35,9 @@ struct Sculpt::Panel_dialog : Top_level_dialog
virtual bool inspect_tab_visible() const = 0; virtual bool inspect_tab_visible() const = 0;
virtual bool system_available() const = 0; virtual bool system_available() const = 0;
virtual bool settings_available() const = 0; virtual bool settings_available() const = 0;
bool inspect_tab_selected() const { return selected_tab() == Tab::INSPECT; }
bool files_tab_selected() const { return selected_tab() == Tab::FILES; }
}; };
State const &_state; State const &_state;