From 73589f6ecd498a858024fcc8ee20e1d8008c6557 Mon Sep 17 00:00:00 2001 From: Philipp Otto Date: Thu, 12 Sep 2019 11:35:30 +0200 Subject: [PATCH 1/2] always activate group after creating it --- .../view/right-menu/delete_group_modal_view.js | 14 +++++--------- .../oxalis/view/right-menu/tree_hierarchy_view.js | 14 ++++++++------ 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/frontend/javascripts/oxalis/view/right-menu/delete_group_modal_view.js b/frontend/javascripts/oxalis/view/right-menu/delete_group_modal_view.js index 37af6e411e6..35596fe0264 100644 --- a/frontend/javascripts/oxalis/view/right-menu/delete_group_modal_view.js +++ b/frontend/javascripts/oxalis/view/right-menu/delete_group_modal_view.js @@ -20,22 +20,18 @@ export default function DeleteGroupModalView({ title={messages["tracing.group_deletion_message"]} onOk={onJustDeleteGroup} onCancel={onCancel} + width={620} footer={[ - , , , ]} > - Do you really want to remove the selected group? If you want to remove the group with all its - trees and subgroups recursively, select "Remove group recursively". If you want to - remove just the group and keep the subtrees and subgroups select "Remove group - only". + When selecting "Remove group and keep children", the children will be moved to the + level of the original group. ); } diff --git a/frontend/javascripts/oxalis/view/right-menu/tree_hierarchy_view.js b/frontend/javascripts/oxalis/view/right-menu/tree_hierarchy_view.js index 35cd2fc9f39..81f6a5f3809 100644 --- a/frontend/javascripts/oxalis/view/right-menu/tree_hierarchy_view.js +++ b/frontend/javascripts/oxalis/view/right-menu/tree_hierarchy_view.js @@ -149,26 +149,27 @@ class TreeHierarchyView extends React.PureComponent { } }; + selectGroupById = (groupId: number) => { + this.props.deselectAllTrees(); + this.props.onSetActiveGroup(groupId); + }; + onSelectGroup = (evt: SyntheticMouseEvent<*>) => { // $FlowFixMe .dataset is unknown to flow const groupId = parseInt(evt.target.dataset.id, 10); const numberOfSelectedTrees = this.props.selectedTrees.length; - const selectGroup = () => { - this.props.deselectAllTrees(); - this.props.onSetActiveGroup(groupId); - }; if (numberOfSelectedTrees > 0) { Modal.confirm({ title: "Do you really want to select this group?", content: `You have ${numberOfSelectedTrees} selected Trees. Do you really want to select this group? This will deselect all selected trees.`, onOk() { - selectGroup(); + this.selectGroupById(groupId); }, onCancel() {}, }); } else { - selectGroup(); + this.selectGroupById(groupId); } }; @@ -240,6 +241,7 @@ class TreeHierarchyView extends React.PureComponent { }); } this.props.onUpdateTreeGroups(newTreeGroups); + this.selectGroupById(newGroupId); } deleteGroup(groupId: number) { From ed1f8805158ac718018b29a1d7f020788ca1cab4 Mon Sep 17 00:00:00 2001 From: Philipp Otto Date: Mon, 16 Sep 2019 11:16:17 +0200 Subject: [PATCH 2/2] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ff7fa7f379..6e6bb5c7cf6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.md). - Renamed "Expected Time" to "Time Limit" in the project table. [#4278](https://github.com/scalableminds/webknossos/pull/4278) - Clicking on an experience domain of a user, while multiple users are selected will edit the domain of all selected users (instead of only the domain of the clicked row). [#4280](https://github.com/scalableminds/webknossos/pull/4280) +- Creating a new group will always activate that group. [#4282](https://github.com/scalableminds/webknossos/pull/4282) ### Fixed - When creating tasks from zip, the individual nml names are used again, rather than the zip name. [#4277](https://github.com/scalableminds/webknossos/pull/4277)