Skip to content

Commit

Permalink
sculpt: fix focus between inspect and file edit
Browse files Browse the repository at this point in the history
Issue #5174
  • Loading branch information
nfeske committed Apr 16, 2024
1 parent 92bd86e commit 9d2e389
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion repos/gems/src/app/sculpt_manager/keyboard_focus.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ struct Sculpt::Keyboard_focus

target = UNDEFINED;

if (_panel.inspect_tab_visible())
if (_panel.inspect_tab_selected() || _panel.files_tab_selected())
target = WM;

if ((_popup.state == Popup::VISIBLE) && _popup_dialog.keyboard_needed())
Expand Down
3 changes: 3 additions & 0 deletions repos/gems/src/app/sculpt_manager/view/panel_dialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ struct Sculpt::Panel_dialog : Top_level_dialog
virtual bool inspect_tab_visible() const = 0;
virtual bool system_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;
Expand Down

0 comments on commit 9d2e389

Please sign in to comment.