Skip to content

Commit 8cfded5

Browse files
committed
Improve replication editor's pin button
- When unpressed, only hide the editor if MultiplayerSynchronizer is not selected. - Add tooltip text.
1 parent ccb1cb4 commit 8cfded5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

modules/multiplayer/editor/multiplayer_editor_plugin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ void MultiplayerEditorPlugin::_node_removed(Node *p_node) {
149149
}
150150

151151
void MultiplayerEditorPlugin::_pinned() {
152-
if (!repl_editor->get_pin()->is_pressed()) {
152+
if (!repl_editor->get_pin()->is_pressed() && repl_editor->get_current() == nullptr) {
153153
if (repl_editor->is_visible_in_tree()) {
154154
EditorNode::get_bottom_panel()->hide_bottom_panel();
155155
}

modules/multiplayer/editor/replication_editor.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ ReplicationEditor::ReplicationEditor() {
270270
pin = memnew(Button);
271271
pin->set_theme_type_variation("FlatButton");
272272
pin->set_toggle_mode(true);
273+
pin->set_tooltip_text(TTR("Pin replication editor"));
273274
hb->add_child(pin);
274275

275276
tree = memnew(Tree);

0 commit comments

Comments
 (0)