Skip to content

Commit

Permalink
Fixed subchain buttons not reflecting their proper usability status.
Browse files Browse the repository at this point in the history
  • Loading branch information
8bitprodigy committed Feb 29, 2024
1 parent 2c7562a commit b008dfd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ func _ready():
set_state(state)

func set_state(new_state:int):
if new_state == prev_state: return
prev_state = state
state = new_state
set_text(state_name[state])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ func setup(_chain_provider: ChainProvider, _chain_state: ChainState):
description.add_theme_font_size_override("font_size", drivechain_descr_font_size)
custom_minimum_size.y = drivechain_minimum_height
action_button.is_drivechain = true
action_button.check_state()
else:
left_indicator.visible = false
background.visible = false
Expand All @@ -60,6 +59,7 @@ func setup(_chain_provider: ChainProvider, _chain_state: ChainState):
size.y = subchain_minimum_height
#content.hide()

action_button.check_state()
title.text = chain_provider.display_name
desc.text = chain_provider.description
block_height.visible = chain_state.state == ChainState.c_state.RUNNING
Expand All @@ -84,6 +84,7 @@ func update_view():
if not chain_provider.is_ready_for_execution():
show_download_state()
elif chain_provider.is_ready_for_execution() and chain_state.state != ChainState.c_state.RUNNING:
action_button.set_state(ActionButton.RUN)
if chain_provider.id == 'drivechain' or Appstate.drivechain_running():
show_executable_state()
else:
Expand Down

0 comments on commit b008dfd

Please sign in to comment.