Skip to content

Fix open and switch command behaviour #193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
c46ca8e
Fix open and switch command behaviour
GloriousPtr Apr 13, 2024
6900014
Merge branch 'fix-open-switch-commands' into dev
GloriousPtr Apr 16, 2024
23d70b1
Remove unused variable: panel
GloriousPtr Apr 16, 2024
222bda2
Merge branch 'dev' into fix-open-switch-commands
GloriousPtr Apr 17, 2024
d127847
Merge branch 'EpicGamesExt:dev' into dev
GloriousPtr Apr 17, 2024
ee477ea
Merge branch 'dev' into fix-open-switch-commands
GloriousPtr Apr 17, 2024
d4b9d29
Merge branch 'EpicGamesExt:dev' into dev
GloriousPtr Apr 17, 2024
a76ee3a
Merge branch 'EpicGamesExt:dev' into dev
GloriousPtr Apr 19, 2024
7ea18db
Merge remote-tracking branch 'origin/dev' into fix-open-switch-commands
GloriousPtr Apr 19, 2024
3e75691
Merge branch 'EpicGamesExt:dev' into dev
GloriousPtr Apr 23, 2024
f961627
Merge branch 'dev' into fix-open-switch-commands
GloriousPtr Apr 23, 2024
0645ea0
Merge branch 'EpicGamesExt:dev' into dev
GloriousPtr Apr 25, 2024
ee8a4d9
Merge branch 'dev' into fix-open-switch-commands
GloriousPtr Apr 25, 2024
e350994
Merge branch 'EpicGamesExt:dev' into dev
GloriousPtr May 2, 2024
d28020b
Merge remote-tracking branch 'origin/dev' into fix-open-switch-commands
GloriousPtr May 2, 2024
eb4ecc0
Better names for panel and view for DF_CoreCmdKind_Switch case
GloriousPtr May 2, 2024
0436377
Merge branch 'EpicGamesExt:dev' into dev
GloriousPtr May 10, 2024
a010bd1
Merge remote-tracking branch 'origin/dev' into fix-open-switch-commands
GloriousPtr May 10, 2024
a5b6c4e
Merge branch 'EpicGamesExt:dev' into dev
GloriousPtr May 13, 2024
f3ca0f9
Merge branch 'EpicGamesExt:dev' into dev
GloriousPtr May 17, 2024
c088858
Merge branch 'EpicGamesExt:dev' into dev
GloriousPtr May 23, 2024
a6032b2
Merge branch 'dev' into fix-open-switch-commands
GloriousPtr May 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions src/df/gfx/df_gfx.c
Original file line number Diff line number Diff line change
Expand Up @@ -2012,7 +2012,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
df_cmd_params_mark_slot(&p, DF_CmdParamSlot_Window);
df_cmd_params_mark_slot(&p, DF_CmdParamSlot_Panel);
df_cmd_params_mark_slot(&p, DF_CmdParamSlot_Entity);
df_cmd_list_push(arena, cmds, &p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_PendingEntity));
df_cmd_list_push(arena, cmds, &p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Switch));
}
}break;
case DF_CoreCmdKind_Reload:
Expand Down Expand Up @@ -2044,14 +2044,21 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
case DF_CoreCmdKind_Switch:
{
B32 already_opened = 0;
DF_Panel *panel = df_panel_from_handle(params.panel);
for(DF_View *v = panel->first_tab_view; !df_view_is_nil(v); v = v->next)
for(DF_Panel *panel = ws->root_panel; !df_panel_is_nil(panel); panel = df_panel_rec_df_pre(panel).next)
{
DF_Entity *v_param_entity = df_entity_from_handle(v->entity);
if(v_param_entity == df_entity_from_handle(params.entity))
for(DF_View *view = panel->first_tab_view; !df_view_is_nil(view); view = view->next)
{
DF_Entity *v_param_entity = df_entity_from_handle(view->entity);
if(v_param_entity == df_entity_from_handle(params.entity))
{
panel->selected_tab_view = df_handle_from_view(view);
ws->focused_panel = panel;
already_opened = 1;
break;
}
}
if(already_opened == 1)
{
panel->selected_tab_view = df_handle_from_view(v);
already_opened = 1;
break;
}
}
Expand Down
Loading