[Bf-blender-cvs] [d0ac5d3810a] master: Cleanup: remove unnecessary tooltip line limit

Campbell Barton noreply at git.blender.org
Wed Dec 20 07:18:43 CET 2017


Commit: d0ac5d3810a6de56385fb86b1463ed4bd3a4d2de
Author: Campbell Barton
Date:   Wed Dec 20 17:20:33 2017 +1100
Branches: master
https://developer.blender.org/rBd0ac5d3810a6de56385fb86b1463ed4bd3a4d2de

Cleanup: remove unnecessary tooltip line limit

Also add TODO for possible future changes.

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

M	source/blender/editors/interface/interface_region_tooltip.c

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

diff --git a/source/blender/editors/interface/interface_region_tooltip.c b/source/blender/editors/interface/interface_region_tooltip.c
index 8186e247a47..bc271d0a9fe 100644
--- a/source/blender/editors/interface/interface_region_tooltip.c
+++ b/source/blender/editors/interface/interface_region_tooltip.c
@@ -29,6 +29,14 @@
  * ToolTip Region and Construction
  */
 
+/* TODO(campbell):
+ * We may want to have a higher level API that initializes a timer,
+ * checks for mouse motion and clears the tool-tip afterwards.
+ * We never want multiple tool-tips at once so this could be handled on the window / window-manager level.
+ *
+ * For now it's not a priority, so leave as-is.
+ */
+
 #include <stdarg.h>
 #include <stdlib.h>
 #include <string.h>
@@ -97,7 +105,6 @@ typedef struct uiTooltipField {
 
 } uiTooltipField;
 
-#define MAX_TOOLTIP_LINES 8
 typedef struct uiTooltipData {
 	rcti bbox;
 	uiTooltipField *fields;
@@ -549,8 +556,6 @@ static uiTooltipData *ui_tooltip_data_from_button(bContext *C, uiBut *but)
 	if (rna_prop.strinfo)
 		MEM_freeN(rna_prop.strinfo);
 
-	BLI_assert(data->fields_len < MAX_TOOLTIP_LINES);
-
 	if (data->fields_len == 0) {
 		MEM_freeN(data);
 		return NULL;



More information about the Bf-blender-cvs mailing list