always produce inheritance child cfg tables for each viz block

This commit is contained in:
Ryan Fleury
2024-08-29 12:48:54 -07:00
parent 719c453bfc
commit df6150c811
2 changed files with 6 additions and 11 deletions
-2
View File
@@ -80,8 +80,6 @@ struct DF_SettingVal
//~ rjf: View Hook Function Types
typedef struct DF_View DF_View;
typedef struct DF_Panel DF_Panel;
typedef struct DF_Window DF_Window;
#define DF_VIEW_SETUP_FUNCTION_SIG(name) void name(DF_View *view, MD_Node *params, String8 string)
#define DF_VIEW_SETUP_FUNCTION_NAME(name) df_view_setup_##name
+6 -9
View File
@@ -54,13 +54,12 @@ D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(default)
last_vb = d_eval_viz_block_split_and_continue(arena, out, last_vb, child_idx);
// rjf: build child config table
D_CfgTable *child_cfg_table = cfg_table;
D_CfgTable *child_cfg_table = push_array(arena, D_CfgTable, 1);
*child_cfg_table = d_cfg_table_from_inheritance(arena, cfg_table);
{
String8 view_rule_string = d_eval_view_rule_from_key(eval_view, child->key);
if(view_rule_string.size != 0)
{
child_cfg_table = push_array(arena, D_CfgTable, 1);
*child_cfg_table = d_cfg_table_from_inheritance(arena, cfg_table);
d_cfg_table_push_unparsed_string(arena, child_cfg_table, view_rule_string, D_CfgSrc_User);
}
}
@@ -124,13 +123,12 @@ D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(default)
last_vb = d_eval_viz_block_split_and_continue(arena, out, last_vb, child_idx);
// rjf: build child config table
D_CfgTable *child_cfg_table = cfg_table;
D_CfgTable *child_cfg_table = push_array(arena, D_CfgTable, 1);
*child_cfg_table = d_cfg_table_from_inheritance(arena, cfg_table);
{
String8 view_rule_string = d_eval_view_rule_from_key(eval_view, child->key);
if(view_rule_string.size != 0)
{
child_cfg_table = push_array(arena, D_CfgTable, 1);
*child_cfg_table = d_cfg_table_from_inheritance(arena, cfg_table);
d_cfg_table_push_unparsed_string(arena, child_cfg_table, view_rule_string, D_CfgSrc_User);
}
}
@@ -150,13 +148,12 @@ D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(default)
D_ExpandKey child_key = d_expand_key_make(df_hash_from_expand_key(key), 1);
// rjf: build child config table
D_CfgTable *child_cfg_table = cfg_table;
D_CfgTable *child_cfg_table = push_array(arena, D_CfgTable, 1);
*child_cfg_table = d_cfg_table_from_inheritance(arena, cfg_table);
{
String8 view_rule_string = d_eval_view_rule_from_key(eval_view, child_key);
if(view_rule_string.size != 0)
{
child_cfg_table = push_array(arena, D_CfgTable, 1);
*child_cfg_table = d_cfg_table_from_inheritance(arena, cfg_table);
d_cfg_table_push_unparsed_string(arena, child_cfg_table, view_rule_string, D_CfgSrc_User);
}
}