Commit: 0c1aab5a25396a18bcaddc8543a8120e41cfd89b
Author: Mateusz Grzeliński
Date:   Fri Aug 14 10:19:48 2020 +0200
Branches: soc-2020-info-editor
https://developer.blender.org/rB0c1aab5a25396a18bcaddc8543a8120e41cfd89b

Cleanup: add update tags for RNA properties

===================================================================

M       source/blender/editors/space_info/info_utils.c
M       source/blender/editors/space_info/space_info.c
M       source/blender/makesrna/intern/rna_space.c
M       source/blender/windowmanager/WM_types.h

===================================================================

diff --git a/source/blender/editors/space_info/info_utils.c 
b/source/blender/editors/space_info/info_utils.c
index 1d8a97ede4c..885d5bd5503 100644
--- a/source/blender/editors/space_info/info_utils.c
+++ b/source/blender/editors/space_info/info_utils.c
@@ -57,7 +57,7 @@ if (STREQ(search_pattern, "")) {
     return true;
   }
   if (!use_match_glob) {
-    char *(*compare_func)(const char *, const char *) = use_match_case ? 
BLI_strcasestr : strstr;
+    char *(*compare_func)(const char *, const char *) = use_match_case ? 
strstr : BLI_strcasestr ;
     bool result = compare_func(string, search_pattern) != NULL;
     if (use_reverse_match) {
       return !result;
diff --git a/source/blender/editors/space_info/space_info.c 
b/source/blender/editors/space_info/space_info.c
index 311b24351b6..b9e65458fc6 100644
--- a/source/blender/editors/space_info/space_info.c
+++ b/source/blender/editors/space_info/space_info.c
@@ -256,10 +256,6 @@ static void info_main_region_listener(wmWindow 
*UNUSED(win),
         /* redraw also but only for report view, could do less redraws by 
checking the type */
         ED_region_tag_redraw(region);
       }
-      else if (wmn->data == ND_SPACE_INFO_CHANGE_REPORT_SOURCE) {
-        /* TODO (grzelins) cleanup */
-        ED_region_tag_redraw(region);
-      }
       break;
   }
 }
diff --git a/source/blender/makesrna/intern/rna_space.c 
b/source/blender/makesrna/intern/rna_space.c
index 1b93a0a7803..fccaf430ba2 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -6124,27 +6124,27 @@ static void rna_def_space_info(BlenderRNA *brna)
   prop = RNA_def_property(srna, "use_short_file_line", PROP_BOOLEAN, 
PROP_NONE);
   RNA_def_property_boolean_sdna(prop, NULL, "use_short_file_line", true);
   RNA_def_property_ui_text(prop, "Shorten File Path", "");
-  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO, NULL);
+  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO_REPORT, NULL);
 
   prop = RNA_def_property(srna, "use_log_level_filter", PROP_BOOLEAN, 
PROP_NONE);
   RNA_def_property_boolean_sdna(prop, NULL, "use_log_filter", 
INFO_FILTER_CLOG_LEVEL);
   RNA_def_property_ui_text(prop, "Use Log Level Filter", "");
-  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO, NULL);
+  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO_REPORT, NULL);
 
   prop = RNA_def_property(srna, "use_log_file_line_filter", PROP_BOOLEAN, 
PROP_NONE);
   RNA_def_property_boolean_sdna(prop, NULL, "use_log_filter", 
INFO_FILTER_CLOG_FILE_LINE);
   RNA_def_property_ui_text(prop, "Use Log File Line Filter", "");
-  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO, NULL);
+  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO_REPORT, NULL);
 
   prop = RNA_def_property(srna, "use_log_type_filter", PROP_BOOLEAN, 
PROP_NONE);
   RNA_def_property_boolean_sdna(prop, NULL, "use_log_filter", 
INFO_FILTER_CLOG_TYPE);
   RNA_def_property_ui_text(prop, "Use Log Type Filter", "");
-  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO, NULL);
+  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO_REPORT, NULL);
 
   prop = RNA_def_property(srna, "use_log_function_filter", PROP_BOOLEAN, 
PROP_NONE);
   RNA_def_property_boolean_sdna(prop, NULL, "use_log_filter", 
INFO_FILTER_CLOG_FUNCTION);
   RNA_def_property_ui_text(prop, "Use Log Function Filter", "");
-  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO, NULL);
+  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO_REPORT, NULL);
 
   rna_def_space_info_filter(brna);
 
@@ -6152,31 +6152,35 @@ static void rna_def_space_info(BlenderRNA *brna)
   RNA_def_property_pointer_sdna(prop, NULL, "search_filter");
   RNA_def_property_struct_type(prop, "SpaceInfoFilter");
   RNA_def_property_ui_text(prop, "General Search", "");
+  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO_REPORT, NULL);
 
   prop = RNA_def_property(srna, "filter_log_file_line", PROP_COLLECTION, 
PROP_NONE);
   RNA_def_property_collection_sdna(prop, NULL, "filter_log_file_line", NULL);
   RNA_def_property_struct_type(prop, "SpaceInfoFilter");
   RNA_def_property_ui_text(prop, "Log File Line Filter", "");
+  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO_REPORT, NULL);
 
   prop = RNA_def_property(srna, "filter_log_type", PROP_COLLECTION, PROP_NONE);
   RNA_def_property_collection_sdna(prop, NULL, "filter_log_type", NULL);
   RNA_def_property_struct_type(prop, "SpaceInfoFilter");
   RNA_def_property_ui_text(prop, "Log File Line Filter", "");
+  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO_REPORT, NULL);
 
   prop = RNA_def_property(srna, "filter_log_function", PROP_COLLECTION, 
PROP_NONE);
   RNA_def_property_collection_sdna(prop, NULL, "filter_log_function", NULL);
   RNA_def_property_struct_type(prop, "SpaceInfoFilter");
   RNA_def_property_ui_text(prop, "Log File Line Filter", "");
+  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO_REPORT, NULL);
 
   prop = RNA_def_property(srna, "use_log_message_new_line", PROP_BOOLEAN, 
PROP_NONE);
   RNA_def_property_boolean_sdna(prop, NULL, "use_log_message_new_line", true);
   RNA_def_property_ui_text(prop, "Print Log Message In New Line", "");
-  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO, NULL);
+  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO_REPORT, NULL);
 
   prop = RNA_def_property(srna, "filter_log_level", PROP_INT, PROP_NONE);
   RNA_def_property_int_sdna(prop, NULL, "filter_log_level");
   RNA_def_property_ui_text(prop, "Filter Log Level", "");
-  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO, NULL);
+  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO_REPORT, NULL);
 
   static const EnumPropertyItem rna_enum_log_format_items[] = {
       {INFO_CLOG_SHOW_TIMESTAMP, "SHOW_TIMESTAMP", 0, "Show Timestamp", ""},
@@ -6193,7 +6197,7 @@ static void rna_def_space_info(BlenderRNA *brna)
   RNA_def_property_ui_text(prop, "Log Printing format", "");
   RNA_def_property_flag(prop, PROP_ENUM_FLAG);
   RNA_def_property_enum_default(prop, INFO_CLOG_FORMAT_DEFAULT);
-  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO, NULL);
+  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO_REPORT, NULL);
 
   static const EnumPropertyItem rna_enum_view_type_items[] = {
       {INFO_VIEW_REPORTS, "REPORTS", 0, "Reports", ""},
@@ -6205,7 +6209,7 @@ static void rna_def_space_info(BlenderRNA *brna)
   RNA_def_property_enum_items(prop, rna_enum_view_type_items);
   RNA_def_property_ui_text(prop, "View reports or logs", "");
   RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
-  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO_CHANGE_REPORT_SOURCE, 
NULL);
+  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO, NULL);
 }
 
 static void rna_def_space_userpref(BlenderRNA *brna)
diff --git a/source/blender/windowmanager/WM_types.h 
b/source/blender/windowmanager/WM_types.h
index 87f96ec826c..7d7c9edc241 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -419,7 +419,6 @@ typedef struct wmNotifier {
 #define ND_SPACE_CHANGED (18 << 16) /*sent to a new editor type after it's 
replaced an old one*/
 #define ND_SPACE_CLIP (19 << 16)
 #define ND_SPACE_FILE_PREVIEW (20 << 16)
-#define ND_SPACE_INFO_CHANGE_REPORT_SOURCE (21 << 16)
 
 /* subtype, 256 entries too */
 #define NOTE_SUBTYPE 0x0000FF00

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to