Skip to content

Commit 043b69d

Browse files
Merge pull request #4714 from 3drepo/ISSUE_4698
ISSUE #4698 - Exiting a sequence clears the transformations
2 parents c2537c2 + 74d711e commit 043b69d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

frontend/src/v4/routes/viewerGui/components/sequences/sequences.component.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ interface IProps {
5858
draggablePanels: string[];
5959
toggleLegend: () => void;
6060
resetLegendPanel: () => void;
61+
clearTransformations: () => void;
6162
}
6263

6364
const da = new Date();
@@ -112,10 +113,15 @@ export class Sequences extends PureComponent<IProps, {}> {
112113
}
113114
}
114115

116+
public onSequenceClose = () => {
117+
this.props.setSelectedSequence(null);
118+
this.props.clearTransformations();
119+
}
120+
115121
public renderTitleIcon = () => {
116122
if (this.props.selectedSequence) {
117123
return (
118-
<IconButton onClick={() => this.props.setSelectedSequence(null)} size="large">
124+
<IconButton onClick={this.onSequenceClose} size="large">
119125
<ArrowBack />
120126
</IconButton>
121127
);

frontend/src/v4/routes/viewerGui/components/sequences/sequences.container.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export const mapDispatchToProps = (dispatch) => bindActionCreators({
6262
resetLegendPanel: LegendActions.resetPanel,
6363
fetchActivityDetails: ActivitiesActions.fetchDetails,
6464
setPanelVisibility: ViewerGuiActions.setPanelVisibility,
65+
clearTransformations: ViewerGuiActions.clearTransformations,
6566
}, dispatch);
6667

6768
export default withRouter(connect(mapStateToProps, mapDispatchToProps)(Sequences));

0 commit comments

Comments
 (0)