Skip to content

Commit

Permalink
Merge pull request godotengine#28292 from homer666/merge-from-scene-s…
Browse files Browse the repository at this point in the history
…tuff

Minor "Merge From Scene" improvements
  • Loading branch information
akien-mga authored Apr 23, 2019
2 parents b874b33 + 36f955e commit 04efa59
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 3 additions & 3 deletions editor/editor_sub_scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ void EditorSubScene::_notification(int p_what) {

if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {

if (!is_visible_in_tree()) {
}
if (is_visible() && scene == NULL)
_path_browse();
}
}

Expand Down Expand Up @@ -232,7 +232,7 @@ EditorSubScene::EditorSubScene() {
hb->add_child(path);
path->set_h_size_flags(SIZE_EXPAND_FILL);
Button *b = memnew(Button);
b->set_text(" .. ");
b->set_text(TTR("Browse"));
hb->add_child(b);
b->connect("pressed", this, "_path_browse");
vb->add_margin_child(TTR("Scene Path:"), hb);
Expand Down
8 changes: 7 additions & 1 deletion editor/scene_tree_dock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1940,7 +1940,13 @@ void SceneTreeDock::set_selected(Node *p_node, bool p_emit_selected) {

void SceneTreeDock::import_subscene() {

import_subscene_dialog->popup_centered_ratio();
Size2 popup_size = Size2(500, 800) * editor_get_scale();
Size2 window_size = get_viewport_rect().size;

popup_size.x = MIN(window_size.x * 0.8, popup_size.x);
popup_size.y = MIN(window_size.y * 0.8, popup_size.y);

import_subscene_dialog->popup_centered(popup_size);
}

void SceneTreeDock::_import_subscene() {
Expand Down

0 comments on commit 04efa59

Please sign in to comment.