Merge pull request #89883 from timothyqiu/replication-pin

Improve replication editor's pin button
This commit is contained in:
Rémi Verschelde 2024-03-26 13:45:42 +01:00
commit aed1775cf2
No known key found for this signature in database
GPG key ID: C3336907360768E1
2 changed files with 2 additions and 1 deletions

View file

@ -149,7 +149,7 @@ void MultiplayerEditorPlugin::_node_removed(Node *p_node) {
}
void MultiplayerEditorPlugin::_pinned() {
if (!repl_editor->get_pin()->is_pressed()) {
if (!repl_editor->get_pin()->is_pressed() && repl_editor->get_current() == nullptr) {
if (repl_editor->is_visible_in_tree()) {
EditorNode::get_bottom_panel()->hide_bottom_panel();
}

View file

@ -270,6 +270,7 @@ ReplicationEditor::ReplicationEditor() {
pin = memnew(Button);
pin->set_theme_type_variation("FlatButton");
pin->set_toggle_mode(true);
pin->set_tooltip_text(TTR("Pin replication editor"));
hb->add_child(pin);
tree = memnew(Tree);