Zylann/godot_heightmap_plugin

godot4 branch: Each Open of import file chooser dialog connects to signal 'file_selected'

MJacred opened this issue · 3 comments

Describe the bug
Each Open of import file chooser dialog connects to signal 'file_selected'

Signal 'file_selected' is already connected to given callable 'VBoxContainer(inspector.gd)::_on_file_selected' in that object.

Import still works.

To Reproduce

  1. open import dialog: Terrain > Import Maps…
  2. open file chooser for heightmap
  3. close file chooser dialog
  4. repeat step 2. -> triggers error message

Environment

  • Godot version: 4.0.3
  • Plugin version: baeaba8

That signal is supposed to be disconnected when the dialog's visibility becomes false:

func _on_file_dialog_visibility_changed():

The signal is emitted when the dialog opens, but... not when it is closed. That broke during the port to Godot 4. Some adjustments needed.

Try with 778889b

Try with 778889b

Fixed 👍
Error message does not appear, and import process stays unaffected