Skip to content

Commit

Permalink
Remove visibility notifier from terminal
Browse files Browse the repository at this point in the history
It seems unnecessary when testing outside of editor and causes the
terminal to render the wrong colors in editor.
  • Loading branch information
lihop committed Jul 11, 2021
1 parent f48e082 commit 33e4640
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions addons/godot_xterm/nodes/terminal/terminal.gd
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export (bool) var copy_on_selection
var _viewport: Viewport = preload("./viewport.tscn").instance()
var _native_terminal: Control = _viewport.get_node("Terminal")
var _screen := TextureRect.new()
var _visibility_notifier := VisibilityNotifier2D.new()

var _selecting := false
var _selecting_mode: int = SelectionMode.NONE
Expand Down Expand Up @@ -98,14 +97,11 @@ func _ready():
_screen.set_anchors_preset(PRESET_WIDE)
_screen.texture = _viewport.get_texture()

_visibility_notifier.connect("screen_entered", self, "_refresh")

_selection_timer.wait_time = 0.05
_selection_timer.connect("timeout", self, "_on_selection_held")

add_child(_viewport)
add_child(_screen)
add_child(_visibility_notifier)
add_child(_selection_timer)

_refresh()
Expand Down Expand Up @@ -185,7 +181,6 @@ func _notification(what: int) -> void:
match what:
NOTIFICATION_RESIZED:
_viewport.size = rect_size
_visibility_notifier.rect = get_rect()
_refresh()
NOTIFICATION_THEME_CHANGED:
_native_terminal.theme = theme
Expand Down

0 comments on commit 33e4640

Please sign in to comment.