summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/animation_track_editor.cpp33
-rw-r--r--editor/animation_track_editor.h3
-rw-r--r--editor/connections_dialog.cpp1
-rw-r--r--editor/editor_fonts.cpp2
4 files changed, 21 insertions, 18 deletions
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp
index 74e8df60f9..7183d34d4f 100644
--- a/editor/animation_track_editor.cpp
+++ b/editor/animation_track_editor.cpp
@@ -5727,16 +5727,24 @@ void AnimationTrackEditor::_show_imported_anim_warning() const {
}
void AnimationTrackEditor::_select_all_tracks_for_copy() {
+
TreeItem *track = track_copy_select->get_root()->get_children();
+ if (!track)
+ return;
+
+ bool all_selected = true;
+ while (track) {
+ if (!track->is_checked(0))
+ all_selected = false;
+
+ track = track->get_next();
+ }
+
+ track = track_copy_select->get_root()->get_children();
while (track) {
- track->set_checked(0, selected_all_tracks);
+ track->set_checked(0, !all_selected);
track = track->get_next();
}
- selected_all_tracks = !selected_all_tracks;
- if (selected_all_tracks)
- select_all_button->set_text(TTR("Select All"));
- else
- select_all_button->set_text(TTR("Select None"));
}
void AnimationTrackEditor::_bind_methods() {
@@ -6067,25 +6075,22 @@ AnimationTrackEditor::AnimationTrackEditor() {
track_copy_dialog = memnew(ConfirmationDialog);
add_child(track_copy_dialog);
- track_copy_dialog->set_title(TTR("Select tracks to copy:"));
+ track_copy_dialog->set_title(TTR("Select Tracks to Copy"));
track_copy_dialog->get_ok()->set_text(TTR("Copy"));
VBoxContainer *track_vbox = memnew(VBoxContainer);
track_copy_dialog->add_child(track_vbox);
- selected_all_tracks = true;
+ Button *select_all_button = memnew(Button);
+ select_all_button->set_text(TTR("Select All/None"));
+ select_all_button->connect("pressed", this, "_select_all_tracks_for_copy");
+ track_vbox->add_child(select_all_button);
track_copy_select = memnew(Tree);
track_copy_select->set_h_size_flags(SIZE_EXPAND_FILL);
track_copy_select->set_v_size_flags(SIZE_EXPAND_FILL);
track_copy_select->set_hide_root(true);
track_vbox->add_child(track_copy_select);
- track_copy_options = memnew(HBoxContainer);
- track_vbox->add_child(track_copy_options);
- select_all_button = memnew(Button);
- select_all_button->set_text(TTR("Select All"));
- select_all_button->connect("pressed", this, "_select_all_tracks_for_copy");
- track_copy_options->add_child(select_all_button);
track_copy_dialog->connect("confirmed", this, "_edit_menu_pressed", varray(EDIT_COPY_TRACKS_CONFIRM));
animation_changing_awaiting_update = false;
}
diff --git a/editor/animation_track_editor.h b/editor/animation_track_editor.h
index 830d5b52d3..fd28d8f4d1 100644
--- a/editor/animation_track_editor.h
+++ b/editor/animation_track_editor.h
@@ -465,11 +465,8 @@ class AnimationTrackEditor : public VBoxContainer {
void _selection_changed();
- bool selected_all_tracks;
ConfirmationDialog *track_copy_dialog;
Tree *track_copy_select;
- HBoxContainer *track_copy_options;
- Button *select_all_button;
struct TrackClipboard {
NodePath full_path;
diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp
index 1e5eabc24e..f5a01dfb04 100644
--- a/editor/connections_dialog.cpp
+++ b/editor/connections_dialog.cpp
@@ -417,6 +417,7 @@ ConnectDialog::ConnectDialog() {
dst_method = memnew(LineEdit);
dst_method->set_h_size_flags(SIZE_EXPAND_FILL);
+ dst_method->connect("text_entered", this, "_builtin_text_entered");
dstm_hb->add_child(dst_method);
advanced = memnew(CheckButton);
diff --git a/editor/editor_fonts.cpp b/editor/editor_fonts.cpp
index b6d27d84e0..97c796c707 100644
--- a/editor/editor_fonts.cpp
+++ b/editor/editor_fonts.cpp
@@ -64,7 +64,7 @@
Ref<DynamicFont> m_name; \
m_name.instance(); \
m_name->set_size(m_size); \
- if (CustomFont.is_valid()) { \
+ if (CustomFontBold.is_valid()) { \
m_name->set_font_data(CustomFontBold); \
m_name->add_fallback(DefaultFontBold); \
} else { \