groups_editor.cpp 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621
  1. /*************************************************************************/
  2. /* groups_editor.cpp */
  3. /*************************************************************************/
  4. /* This file is part of: */
  5. /* GODOT ENGINE */
  6. /* https://godotengine.org */
  7. /*************************************************************************/
  8. /* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
  9. /* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
  10. /* */
  11. /* Permission is hereby granted, free of charge, to any person obtaining */
  12. /* a copy of this software and associated documentation files (the */
  13. /* "Software"), to deal in the Software without restriction, including */
  14. /* without limitation the rights to use, copy, modify, merge, publish, */
  15. /* distribute, sublicense, and/or sell copies of the Software, and to */
  16. /* permit persons to whom the Software is furnished to do so, subject to */
  17. /* the following conditions: */
  18. /* */
  19. /* The above copyright notice and this permission notice shall be */
  20. /* included in all copies or substantial portions of the Software. */
  21. /* */
  22. /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
  23. /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
  24. /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
  25. /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
  26. /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
  27. /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
  28. /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
  29. /*************************************************************************/
  30. #include "groups_editor.h"
  31. #include "editor/scene_tree_editor.h"
  32. #include "editor_node.h"
  33. #include "scene/gui/box_container.h"
  34. #include "scene/gui/label.h"
  35. #include "scene/resources/packed_scene.h"
  36. void GroupDialog::ok_pressed() {
  37. }
  38. void GroupDialog::_cancel_pressed() {
  39. }
  40. void GroupDialog::_group_selected() {
  41. nodes_to_add->clear();
  42. add_node_root = nodes_to_add->create_item();
  43. nodes_to_remove->clear();
  44. remove_node_root = nodes_to_remove->create_item();
  45. if (!groups->is_anything_selected()) {
  46. return;
  47. }
  48. selected_group = groups->get_selected()->get_text(0);
  49. _load_nodes(scene_tree->get_edited_scene_root());
  50. }
  51. void GroupDialog::_load_nodes(Node *p_current) {
  52. String item_name = p_current->get_name();
  53. if (p_current != scene_tree->get_edited_scene_root()) {
  54. item_name = String(p_current->get_parent()->get_name()) + "/" + String(item_name);
  55. }
  56. bool keep = true;
  57. Node *root = scene_tree->get_edited_scene_root();
  58. Node *owner = p_current->get_owner();
  59. if (owner != root && p_current != root && !owner && !root->is_editable_instance(owner)) {
  60. keep = false;
  61. }
  62. TreeItem *node;
  63. NodePath path = scene_tree->get_edited_scene_root()->get_path_to(p_current);
  64. if (keep && p_current->is_in_group(selected_group)) {
  65. if (remove_filter->get_text().is_subsequence_ofi(String(p_current->get_name()))) {
  66. node = nodes_to_remove->create_item(remove_node_root);
  67. keep = true;
  68. } else {
  69. keep = false;
  70. }
  71. } else if (keep && add_filter->get_text().is_subsequence_ofi(String(p_current->get_name()))) {
  72. node = nodes_to_add->create_item(add_node_root);
  73. keep = true;
  74. } else {
  75. keep = false;
  76. }
  77. if (keep) {
  78. node->set_text(0, item_name);
  79. node->set_metadata(0, path);
  80. node->set_tooltip(0, path);
  81. Ref<Texture> icon = EditorNode::get_singleton()->get_object_icon(p_current, "Node");
  82. node->set_icon(0, icon);
  83. if (!_can_edit(p_current, selected_group)) {
  84. node->set_selectable(0, false);
  85. node->set_custom_color(0, get_color("disabled_font_color", "Editor"));
  86. }
  87. }
  88. for (int i = 0; i < p_current->get_child_count(); i++) {
  89. _load_nodes(p_current->get_child(i));
  90. }
  91. }
  92. bool GroupDialog::_can_edit(Node *p_node, String p_group) {
  93. Node *n = p_node;
  94. bool can_edit = true;
  95. while (n) {
  96. Ref<SceneState> ss = (n == EditorNode::get_singleton()->get_edited_scene()) ? n->get_scene_inherited_state() : n->get_scene_instance_state();
  97. if (ss.is_valid()) {
  98. int path = ss->find_node_by_path(n->get_path_to(p_node));
  99. if (path != -1) {
  100. if (ss->is_node_in_group(path, p_group)) {
  101. can_edit = false;
  102. }
  103. }
  104. }
  105. n = n->get_owner();
  106. }
  107. return can_edit;
  108. }
  109. void GroupDialog::_add_pressed() {
  110. TreeItem *selected = nodes_to_add->get_selected();
  111. if (!selected) {
  112. return;
  113. }
  114. while (selected) {
  115. Node *node = scene_tree->get_edited_scene_root()->get_node(selected->get_metadata(0));
  116. node->add_to_group(selected_group, true);
  117. selected = nodes_to_add->get_next_selected(selected);
  118. }
  119. _group_selected();
  120. EditorNode::get_singleton()->get_scene_tree_dock()->get_tree_editor()->update_tree();
  121. }
  122. void GroupDialog::_removed_pressed() {
  123. TreeItem *selected = nodes_to_remove->get_selected();
  124. if (!selected) {
  125. return;
  126. }
  127. while (selected) {
  128. Node *node = scene_tree->get_edited_scene_root()->get_node(selected->get_metadata(0));
  129. node->remove_from_group(selected_group);
  130. selected = nodes_to_add->get_next_selected(selected);
  131. }
  132. _group_selected();
  133. EditorNode::get_singleton()->get_scene_tree_dock()->get_tree_editor()->update_tree();
  134. }
  135. void GroupDialog::_remove_filter_changed(const String &p_filter) {
  136. _group_selected();
  137. }
  138. void GroupDialog::_add_filter_changed(const String &p_filter) {
  139. _group_selected();
  140. }
  141. void GroupDialog::_add_group_pressed() {
  142. _add_group(add_group_text->get_text());
  143. add_group_text->clear();
  144. }
  145. void GroupDialog::_group_renamed() {
  146. TreeItem *renamed_group = groups->get_edited();
  147. if (!renamed_group) {
  148. return;
  149. }
  150. String name = renamed_group->get_text(0).strip_edges();
  151. for (TreeItem *E = groups_root->get_children(); E; E = E->get_next()) {
  152. if (E != renamed_group && E->get_text(0) == name) {
  153. renamed_group->set_text(0, selected_group);
  154. error->set_text(TTR("Group name already exists."));
  155. error->popup_centered();
  156. return;
  157. }
  158. }
  159. if (name == "") {
  160. renamed_group->set_text(0, selected_group);
  161. error->set_text(TTR("Invalid group name."));
  162. error->popup_centered();
  163. return;
  164. }
  165. List<Node *> nodes;
  166. scene_tree->get_nodes_in_group(selected_group, &nodes);
  167. bool removed_all = true;
  168. for (List<Node *>::Element *E = nodes.front(); E; E = E->next()) {
  169. Node *node = E->get();
  170. if (_can_edit(node, selected_group)) {
  171. node->remove_from_group(selected_group);
  172. node->add_to_group(name, true);
  173. } else {
  174. removed_all = false;
  175. }
  176. }
  177. if (!removed_all) {
  178. _add_group(selected_group);
  179. }
  180. selected_group = renamed_group->get_text(0);
  181. _group_selected();
  182. }
  183. void GroupDialog::_add_group(String p_name) {
  184. String name = p_name.strip_edges();
  185. if (name == "" || groups->search_item_text(name)) {
  186. return;
  187. }
  188. TreeItem *new_group = groups->create_item(groups_root);
  189. new_group->set_text(0, name);
  190. new_group->add_button(0, get_icon("Remove", "EditorIcons"), 0);
  191. new_group->set_editable(0, true);
  192. }
  193. void GroupDialog::_load_groups(Node *p_current) {
  194. List<Node::GroupInfo> gi;
  195. p_current->get_groups(&gi);
  196. for (List<Node::GroupInfo>::Element *E = gi.front(); E; E = E->next()) {
  197. if (!E->get().persistent) {
  198. continue;
  199. }
  200. _add_group(E->get().name);
  201. }
  202. for (int i = 0; i < p_current->get_child_count(); i++) {
  203. _load_groups(p_current->get_child(i));
  204. }
  205. }
  206. void GroupDialog::_delete_group_pressed(Object *p_item, int p_column, int p_id) {
  207. TreeItem *ti = Object::cast_to<TreeItem>(p_item);
  208. if (!ti)
  209. return;
  210. String name = ti->get_text(0);
  211. List<Node *> nodes;
  212. scene_tree->get_nodes_in_group(name, &nodes);
  213. bool removed_all = true;
  214. for (List<Node *>::Element *E = nodes.front(); E; E = E->next()) {
  215. if (_can_edit(E->get(), name)) {
  216. E->get()->remove_from_group(name);
  217. } else {
  218. removed_all = false;
  219. }
  220. }
  221. if (removed_all) {
  222. if (selected_group == name) {
  223. add_filter->clear();
  224. remove_filter->clear();
  225. nodes_to_remove->clear();
  226. nodes_to_add->clear();
  227. groups->deselect_all();
  228. selected_group = "";
  229. }
  230. groups_root->remove_child(ti);
  231. }
  232. EditorNode::get_singleton()->get_scene_tree_dock()->get_tree_editor()->update_tree();
  233. }
  234. void GroupDialog::_notification(int p_what) {
  235. switch (p_what) {
  236. case NOTIFICATION_ENTER_TREE: {
  237. add_button->set_icon(get_icon("Forward", "EditorIcons"));
  238. remove_button->set_icon(get_icon("Back", "EditorIcons"));
  239. add_filter->set_right_icon(get_icon("Search", "EditorIcons"));
  240. add_filter->set_clear_button_enabled(true);
  241. remove_filter->set_right_icon(get_icon("Search", "EditorIcons"));
  242. remove_filter->set_clear_button_enabled(true);
  243. } break;
  244. }
  245. }
  246. void GroupDialog::edit() {
  247. popup_centered(Size2(600, 400));
  248. groups->clear();
  249. groups_root = groups->create_item();
  250. nodes_to_add->clear();
  251. nodes_to_remove->clear();
  252. add_group_text->clear();
  253. add_filter->clear();
  254. remove_filter->clear();
  255. _load_groups(scene_tree->get_edited_scene_root());
  256. }
  257. void GroupDialog::_bind_methods() {
  258. ClassDB::bind_method("_cancel", &GroupDialog::_cancel_pressed);
  259. ClassDB::bind_method("_add_pressed", &GroupDialog::_add_pressed);
  260. ClassDB::bind_method("_removed_pressed", &GroupDialog::_removed_pressed);
  261. ClassDB::bind_method("_delete_group_pressed", &GroupDialog::_delete_group_pressed);
  262. ClassDB::bind_method("_group_selected", &GroupDialog::_group_selected);
  263. ClassDB::bind_method("_add_group_pressed", &GroupDialog::_add_group_pressed);
  264. ClassDB::bind_method("_add_filter_changed", &GroupDialog::_add_filter_changed);
  265. ClassDB::bind_method("_remove_filter_changed", &GroupDialog::_remove_filter_changed);
  266. ClassDB::bind_method("_group_renamed", &GroupDialog::_group_renamed);
  267. }
  268. GroupDialog::GroupDialog() {
  269. scene_tree = SceneTree::get_singleton();
  270. VBoxContainer *vbc = memnew(VBoxContainer);
  271. add_child(vbc);
  272. HBoxContainer *hbc = memnew(HBoxContainer);
  273. vbc->add_child(hbc);
  274. hbc->set_v_size_flags(SIZE_EXPAND_FILL);
  275. VBoxContainer *vbc_left = memnew(VBoxContainer);
  276. hbc->add_child(vbc_left);
  277. vbc_left->set_h_size_flags(SIZE_EXPAND_FILL);
  278. Label *group_title = memnew(Label);
  279. group_title->set_text(TTR("Groups"));
  280. vbc_left->add_child(group_title);
  281. groups = memnew(Tree);
  282. vbc_left->add_child(groups);
  283. groups->set_hide_root(true);
  284. groups->set_v_size_flags(SIZE_EXPAND_FILL);
  285. groups->set_select_mode(Tree::SELECT_SINGLE);
  286. groups->set_allow_reselect(true);
  287. groups->set_allow_rmb_select(true);
  288. groups->connect("item_selected", this, "_group_selected");
  289. groups->connect("button_pressed", this, "_delete_group_pressed");
  290. groups->connect("item_edited", this, "_group_renamed");
  291. HBoxContainer *chbc = memnew(HBoxContainer);
  292. vbc_left->add_child(chbc);
  293. chbc->set_h_size_flags(SIZE_EXPAND_FILL);
  294. add_group_text = memnew(LineEdit);
  295. chbc->add_child(add_group_text);
  296. add_group_text->set_h_size_flags(SIZE_EXPAND_FILL);
  297. Button *add_group_button = memnew(Button);
  298. add_group_button->set_text("Add");
  299. chbc->add_child(add_group_button);
  300. add_group_button->connect("pressed", this, "_add_group_pressed");
  301. VBoxContainer *vbc_add = memnew(VBoxContainer);
  302. hbc->add_child(vbc_add);
  303. vbc_add->set_h_size_flags(SIZE_EXPAND_FILL);
  304. Label *out_of_group_title = memnew(Label);
  305. out_of_group_title->set_text(TTR("Nodes not in Group"));
  306. vbc_add->add_child(out_of_group_title);
  307. nodes_to_add = memnew(Tree);
  308. vbc_add->add_child(nodes_to_add);
  309. nodes_to_add->set_hide_root(true);
  310. nodes_to_add->set_hide_folding(true);
  311. nodes_to_add->set_v_size_flags(SIZE_EXPAND_FILL);
  312. nodes_to_add->set_select_mode(Tree::SELECT_MULTI);
  313. nodes_to_add->connect("item_selected", this, "_nodes_to_add_selected");
  314. HBoxContainer *add_filter_hbc = memnew(HBoxContainer);
  315. add_filter_hbc->add_constant_override("separate", 0);
  316. vbc_add->add_child(add_filter_hbc);
  317. add_filter = memnew(LineEdit);
  318. add_filter->set_h_size_flags(SIZE_EXPAND_FILL);
  319. add_filter->set_placeholder(TTR("Filter nodes"));
  320. add_filter_hbc->add_child(add_filter);
  321. add_filter->connect("text_changed", this, "_add_filter_changed");
  322. VBoxContainer *vbc_buttons = memnew(VBoxContainer);
  323. hbc->add_child(vbc_buttons);
  324. vbc_buttons->set_h_size_flags(SIZE_SHRINK_CENTER);
  325. vbc_buttons->set_v_size_flags(SIZE_SHRINK_CENTER);
  326. add_button = memnew(ToolButton);
  327. add_button->set_text(TTR("Add"));
  328. add_button->connect("pressed", this, "_add_pressed");
  329. vbc_buttons->add_child(add_button);
  330. vbc_buttons->add_spacer();
  331. vbc_buttons->add_spacer();
  332. vbc_buttons->add_spacer();
  333. remove_button = memnew(ToolButton);
  334. remove_button->set_text(TTR("Remove"));
  335. remove_button->connect("pressed", this, "_removed_pressed");
  336. vbc_buttons->add_child(remove_button);
  337. VBoxContainer *vbc_remove = memnew(VBoxContainer);
  338. hbc->add_child(vbc_remove);
  339. vbc_remove->set_h_size_flags(SIZE_EXPAND_FILL);
  340. Label *in_group_title = memnew(Label);
  341. in_group_title->set_text(TTR("Nodes in Group"));
  342. vbc_remove->add_child(in_group_title);
  343. nodes_to_remove = memnew(Tree);
  344. vbc_remove->add_child(nodes_to_remove);
  345. nodes_to_remove->set_v_size_flags(SIZE_EXPAND_FILL);
  346. nodes_to_remove->set_hide_root(true);
  347. nodes_to_remove->set_hide_folding(true);
  348. nodes_to_remove->set_select_mode(Tree::SELECT_MULTI);
  349. nodes_to_remove->connect("item_selected", this, "_node_to_remove_selected");
  350. HBoxContainer *remove_filter_hbc = memnew(HBoxContainer);
  351. remove_filter_hbc->add_constant_override("separate", 0);
  352. vbc_remove->add_child(remove_filter_hbc);
  353. remove_filter = memnew(LineEdit);
  354. remove_filter->set_h_size_flags(SIZE_EXPAND_FILL);
  355. remove_filter->set_placeholder(TTR("Filter nodes"));
  356. remove_filter_hbc->add_child(remove_filter);
  357. remove_filter->connect("text_changed", this, "_remove_filter_changed");
  358. set_title("Group Editor");
  359. get_cancel()->hide();
  360. set_as_toplevel(true);
  361. set_resizable(true);
  362. error = memnew(ConfirmationDialog);
  363. add_child(error);
  364. error->get_ok()->set_text(TTR("Close"));
  365. }
  366. ////////////////////////////////////////////////////////////////////////////////
  367. void GroupsEditor::_add_group(const String &p_group) {
  368. if (!node)
  369. return;
  370. String name = group_name->get_text();
  371. if (name.strip_edges() == "")
  372. return;
  373. if (node->is_in_group(name))
  374. return;
  375. undo_redo->create_action(TTR("Add to Group"));
  376. undo_redo->add_do_method(node, "add_to_group", name, true);
  377. undo_redo->add_do_method(this, "update_tree");
  378. undo_redo->add_undo_method(node, "remove_from_group", name);
  379. undo_redo->add_undo_method(this, "update_tree");
  380. undo_redo->add_do_method(EditorNode::get_singleton()->get_scene_tree_dock()->get_tree_editor(), "update_tree"); //to force redraw of scene tree
  381. undo_redo->add_undo_method(EditorNode::get_singleton()->get_scene_tree_dock()->get_tree_editor(), "update_tree"); //to force redraw of scene tree
  382. undo_redo->commit_action();
  383. group_name->clear();
  384. }
  385. void GroupsEditor::_remove_group(Object *p_item, int p_column, int p_id) {
  386. if (!node)
  387. return;
  388. TreeItem *ti = Object::cast_to<TreeItem>(p_item);
  389. if (!ti)
  390. return;
  391. String name = ti->get_text(0);
  392. undo_redo->create_action(TTR("Remove from Group"));
  393. undo_redo->add_do_method(node, "remove_from_group", name);
  394. undo_redo->add_do_method(this, "update_tree");
  395. undo_redo->add_undo_method(node, "add_to_group", name, true);
  396. undo_redo->add_undo_method(this, "update_tree");
  397. undo_redo->add_do_method(EditorNode::get_singleton()->get_scene_tree_dock()->get_tree_editor(), "update_tree"); //to force redraw of scene tree
  398. undo_redo->add_undo_method(EditorNode::get_singleton()->get_scene_tree_dock()->get_tree_editor(), "update_tree"); //to force redraw of scene tree
  399. undo_redo->commit_action();
  400. }
  401. struct _GroupInfoComparator {
  402. bool operator()(const Node::GroupInfo &p_a, const Node::GroupInfo &p_b) const {
  403. return p_a.name.operator String() < p_b.name.operator String();
  404. }
  405. };
  406. void GroupsEditor::update_tree() {
  407. tree->clear();
  408. if (!node)
  409. return;
  410. List<Node::GroupInfo> groups;
  411. node->get_groups(&groups);
  412. groups.sort_custom<_GroupInfoComparator>();
  413. TreeItem *root = tree->create_item();
  414. for (List<GroupInfo>::Element *E = groups.front(); E; E = E->next()) {
  415. Node::GroupInfo gi = E->get();
  416. if (!gi.persistent)
  417. continue;
  418. Node *n = node;
  419. bool can_be_deleted = true;
  420. while (n) {
  421. Ref<SceneState> ss = (n == EditorNode::get_singleton()->get_edited_scene()) ? n->get_scene_inherited_state() : n->get_scene_instance_state();
  422. if (ss.is_valid()) {
  423. int path = ss->find_node_by_path(n->get_path_to(node));
  424. if (path != -1) {
  425. if (ss->is_node_in_group(path, gi.name)) {
  426. can_be_deleted = false;
  427. }
  428. }
  429. }
  430. n = n->get_owner();
  431. }
  432. TreeItem *item = tree->create_item(root);
  433. item->set_text(0, gi.name);
  434. if (can_be_deleted) {
  435. item->add_button(0, get_icon("Remove", "EditorIcons"), 0);
  436. } else {
  437. item->set_selectable(0, false);
  438. }
  439. }
  440. }
  441. void GroupsEditor::set_current(Node *p_node) {
  442. node = p_node;
  443. update_tree();
  444. }
  445. void GroupsEditor::_show_group_dialog() {
  446. group_dialog->edit();
  447. }
  448. void GroupsEditor::_group_dialog_closed() {
  449. update_tree();
  450. }
  451. void GroupsEditor::_bind_methods() {
  452. ClassDB::bind_method("_add_group", &GroupsEditor::_add_group);
  453. ClassDB::bind_method("_remove_group", &GroupsEditor::_remove_group);
  454. ClassDB::bind_method("update_tree", &GroupsEditor::update_tree);
  455. ClassDB::bind_method("_show_group_dialog", &GroupsEditor::_show_group_dialog);
  456. ClassDB::bind_method("_group_dialog_closed", &GroupsEditor::_group_dialog_closed);
  457. }
  458. GroupsEditor::GroupsEditor() {
  459. node = NULL;
  460. VBoxContainer *vbc = this;
  461. group_dialog = memnew(GroupDialog);
  462. group_dialog->set_as_toplevel(true);
  463. add_child(group_dialog);
  464. group_dialog->connect("popup_hide", this, "_group_dialog_closed");
  465. Button *group_dialog_button = memnew(Button);
  466. group_dialog_button->set_text(TTR("Manage Groups"));
  467. vbc->add_child(group_dialog_button);
  468. group_dialog_button->connect("pressed", this, "_show_group_dialog");
  469. HBoxContainer *hbc = memnew(HBoxContainer);
  470. vbc->add_child(hbc);
  471. group_name = memnew(LineEdit);
  472. group_name->set_h_size_flags(SIZE_EXPAND_FILL);
  473. hbc->add_child(group_name);
  474. group_name->connect("text_entered", this, "_add_group");
  475. add = memnew(Button);
  476. add->set_text(TTR("Add"));
  477. hbc->add_child(add);
  478. add->connect("pressed", this, "_add_group", varray(String()));
  479. tree = memnew(Tree);
  480. tree->set_hide_root(true);
  481. tree->set_v_size_flags(SIZE_EXPAND_FILL);
  482. vbc->add_child(tree);
  483. tree->connect("button_pressed", this, "_remove_group");
  484. add_constant_override("separation", 3 * EDSCALE);
  485. }
  486. GroupsEditor::~GroupsEditor() {
  487. }