File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -418,7 +418,8 @@ class EditorPropertyPortraits extends EditorProperty:
418418 var options :OptionButton
419419
420420 func _option_selected (option :int ) -> void :
421- pass
421+ var value = options .get_item_metadata (option )
422+ emit_changed (get_edited_property (), value )
422423
423424
424425 func _set_read_only (value :bool ) -> void :
@@ -459,15 +460,12 @@ class EditorPropertyPortraits extends EditorProperty:
459460 current_value += 1
460461
461462
462- func set_option_button_clip (enable :bool ) -> void :
463- pass
464-
465-
466463 func _init () -> void :
467464 options = OptionButton .new ()
468465 options .flat = true
469466 options .clip_text = true
470467 options .expand_icon = true
468+ options .connect ("item_selected" , self , "_option_selected" )
471469 var _options_popup :PopupMenu = options .get_popup ()
472470 _options_popup .allow_search = true
473471 add_child (options )
You can’t perform that action at this time.
0 commit comments