fix #185: create new Panel when all panels are empty
This commit is contained in:
parent
33b31bb5cd
commit
a06e002052
|
|
@ -224,9 +224,15 @@ func handle_mouse_button(input: InputEventMouseButton, to_handle = currently_act
|
|||
to_handle = area.exchange_sticky_note_with(to_handle)
|
||||
to_handle.reparent(dropzone)
|
||||
to_handle.on_board = true
|
||||
# FIXME: this caused an error when all stickies were attatched ...
|
||||
if sticky_note_container.get_child_count() > 0:
|
||||
sticky_note_container.get_child(current_sticky_note_id).attached_sticky_note = to_handle
|
||||
to_handle.attached_to = sticky_note_container.get_child(current_sticky_note_id)
|
||||
else:
|
||||
var new_panel = StickyNotePanel.new()
|
||||
sticky_note_container.add_child(new_panel, true, Node.INTERNAL_MODE_DISABLED)
|
||||
new_panel.owner = self
|
||||
new_panel.attatch_sticky_note(to_handle, self, false)
|
||||
current_sticky_note_id = 0
|
||||
to_handle.reset_drag()
|
||||
current_context = NAVIGATE
|
||||
_return_sticky_notes_to_panels()
|
||||
|
|
|
|||
Loading…
Reference in New Issue