mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-03-12 22:35:18 +00:00
Disable "From Current Palette" preset option when creating a new palette, if there is no current palette
Fixes #659
This commit is contained in:
parent
07473bea95
commit
294738e48a
2 changed files with 5 additions and 0 deletions
|
@ -119,6 +119,8 @@ func _create_new_empty_palette(name: String, comment: String, width: int, height
|
|||
|
||||
|
||||
func _create_new_palette_from_current_palette(name: String, comment: String) -> void:
|
||||
if !current_palette:
|
||||
return
|
||||
var new_palette: Palette = current_palette.duplicate()
|
||||
new_palette.name = name
|
||||
new_palette.comment = comment
|
||||
|
|
|
@ -35,6 +35,9 @@ func open(opened_current_palette: Palette) -> void:
|
|||
# Disable ok button until user enters name
|
||||
toggle_ok_button_disability(true)
|
||||
|
||||
# Disable create "From Current Palette" if there's no palette
|
||||
preset_input.set_item_disabled(1, !current_palette)
|
||||
|
||||
# Stop all inputs in the rest of the app
|
||||
Global.dialog_open(true)
|
||||
popup_centered()
|
||||
|
|
Loading…
Add table
Reference in a new issue