Signals: Port more uses of connect_compat
Those were problematic as they call a method of their parent class, but callable_mp does not allow that unless it's public. To solve it, we declare a local class that calls the parent class' method, which now needs to be protected to be accessible in the derived class.
This commit is contained in:
parent
b8f08b42e7
commit
09a6a2d8f8
19 changed files with 79 additions and 41 deletions
|
|
@ -389,6 +389,10 @@ void PropertySelector::_item_selected() {
|
|||
help_bit->set_text(text);
|
||||
}
|
||||
|
||||
void PropertySelector::_hide_requested() {
|
||||
_closed(); // From WindowDialog.
|
||||
}
|
||||
|
||||
void PropertySelector::_notification(int p_what) {
|
||||
|
||||
if (p_what == NOTIFICATION_ENTER_TREE) {
|
||||
|
|
@ -568,5 +572,5 @@ PropertySelector::PropertySelector() {
|
|||
|
||||
help_bit = memnew(EditorHelpBit);
|
||||
vbc->add_margin_child(TTR("Description:"), help_bit);
|
||||
help_bit->connect_compat("request_hide", this, "_closed");
|
||||
help_bit->connect("request_hide", callable_mp(this, &PropertySelector::_hide_requested));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue