Skip to content

Commit

Permalink
[plugin|licenses] No tooltip on multiline string if empty
Browse files Browse the repository at this point in the history
  • Loading branch information
IceflowRE committed Sep 25, 2023
1 parent 191ff8f commit 69b3569
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion addons/licenses/internal/handler/string_multiline.gd
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ func _init(tree_: ComponentDetailTree, item_: TreeItem, value_: Variant, propert
super._init(tree_, item_, value_, property_)
self.item.set_text(0, self.property["name"].capitalize())
self.item.set_text(1, self.value)
self.item.set_tooltip_text(1, self.value.substr(0, mini(self.value.length(), 512)) + "...")
var tooltip_text: String = self.value.substr(0, mini(self.value.length(), 512))
if self.value.length() > 512:
tooltip_text += "..."
self.item.set_tooltip_text(1, tooltip_text)
self._update_reset_button()
self.item.add_button(1, self.tree.get_theme_icon("DistractionFree", "EditorIcons"), 1)

Expand Down

0 comments on commit 69b3569

Please sign in to comment.