Show correct name of signal when editing an existing one

Use popup_dialog() instead of popup_centered() to show edit dialog/

With popup_centered it is not possible to change the displayed
signal name. When this is not set the previous shown name is show
for the current dialog.

This is no problem when creating a new conenction as popop_dialog
is used there and this would update the title.

Fixes #42074

(cherry picked from commit eeb6c2e22c)
This commit is contained in:
Melvin Louwerse 2020-09-15 11:54:57 +02:00 committed by Rémi Verschelde
parent 1f42a8a073
commit 22efebc599
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -742,8 +742,9 @@ void ConnectionsDock::_open_connection_dialog(Connection cToEdit) {
Node *dst = static_cast<Node *>(cToEdit.target); Node *dst = static_cast<Node *>(cToEdit.target);
if (src && dst) { if (src && dst) {
const String &signalname = cToEdit.signal;
connect_dialog->set_title(TTR("Edit Connection:") + cToEdit.signal); connect_dialog->set_title(TTR("Edit Connection:") + cToEdit.signal);
connect_dialog->popup_centered(); connect_dialog->popup_dialog(signalname);
connect_dialog->init(cToEdit, true); connect_dialog->init(cToEdit, true);
} }
} }