@@ -412,21 +412,21 @@ func _get_tooltip(at_position: Vector2) -> String:
412412
413413 return ""
414414
415- var current_tab := Configs .savedata .get_tab (hovered_tab_idx )
415+ var hovered_tab := Configs .savedata .get_tab (hovered_tab_idx )
416416 # We have to pass some metadata to the tooltip.
417417 # Since "*" isn't valid in filepaths, we use it as a delimiter.
418418 if hovered_tab_idx == Configs .savedata .get_active_tab_index ():
419- return "%s *active" % current_tab .get_presented_svg_file_path ()
419+ return "%s *active" % hovered_tab .get_presented_svg_file_path ()
420420
421- return "%s *%d " % [current_tab .get_presented_svg_file_path (), current_tab .id ]
421+ return "%s *%d " % [hovered_tab .get_presented_svg_file_path (), hovered_tab .id ]
422422
423423func _make_custom_tooltip (for_text : String ) -> Object :
424424 var asterisk_pos := for_text .find ("*" )
425425 if asterisk_pos == - 1 :
426426 return null
427427
428- var current_tab := Configs .savedata .get_tab (get_hovered_index ())
429- var is_saved := not current_tab .svg_file_path .is_empty ()
428+ var hovered_tab := Configs .savedata .get_tab (get_hovered_index ())
429+ var is_saved := not hovered_tab .svg_file_path .is_empty ()
430430
431431 var path := for_text .left (asterisk_pos )
432432 var label := Label .new ()
@@ -438,9 +438,9 @@ func _make_custom_tooltip(for_text: String) -> Object:
438438 Translator .translate ("This SVG is not bound to a file location yet." )
439439 Utils .set_max_text_width (label , 192.0 , 4.0 )
440440
441- # If the tab is active, no need for an SVG preview.
441+ # If the tab is active or empty , no need for an SVG preview.
442442 var metadata := for_text .right (- asterisk_pos - 1 )
443- if metadata == "active" :
443+ if metadata == "active" or hovered_tab . empty_unsaved :
444444 return label
445445
446446 var id := metadata .to_int ()
0 commit comments