From 0529c43c25fe927ae3a843c2e8fd00eaa03e42f3 Mon Sep 17 00:00:00 2001 From: DD Date: Mon, 9 Apr 2018 20:21:04 -0400 Subject: [PATCH] Change back to vector when switching costumes --- src/containers/paper-canvas.jsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/containers/paper-canvas.jsx b/src/containers/paper-canvas.jsx index b0b3216a..254e730a 100644 --- a/src/containers/paper-canvas.jsx +++ b/src/containers/paper-canvas.jsx @@ -19,6 +19,7 @@ import {ensureClockwise} from '../helper/math'; import {clearHoveredItem} from '../reducers/hover'; import {clearPasteOffset} from '../reducers/clipboard'; import {updateViewBounds} from '../reducers/view-bounds'; +import {changeFormat} from '../reducers/format'; import {isVector, isBitmap} from '../lib/format'; @@ -114,6 +115,7 @@ class PaperCanvas extends React.Component { this.props.clearHoveredItem(); this.props.clearPasteOffset(); if (svg) { + this.props.changeFormat(Formats.VECTOR); // Store the zoom/pan and restore it after importing a new SVG const oldZoom = paper.project.view.zoom; const oldCenter = paper.project.view.center.clone(); @@ -290,6 +292,9 @@ const mapDispatchToProps = dispatch => ({ clearPasteOffset: () => { dispatch(clearPasteOffset()); }, + changeFormat: format => { + dispatch(changeFormat(format)); + }, updateViewBounds: matrix => { dispatch(updateViewBounds(matrix)); }