Cleanup: remove unnecessary tooltip line limit

Also add TODO for possible future changes.
This commit is contained in:
Campbell Barton 2017-12-20 17:20:33 +11:00
parent 51f0c3fadf
commit d0ac5d3810
1 changed files with 8 additions and 3 deletions

View File

@ -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;