* save project after changing sketch name * not saving the sketch after updating the name if it's not created yet
This commit is contained in:
parent
f7706df949
commit
185d8fdd05
2 changed files with 8 additions and 2 deletions
|
@ -103,6 +103,9 @@ class Toolbar extends React.Component {
|
||||||
onBlur={() => {
|
onBlur={() => {
|
||||||
this.validateProjectName();
|
this.validateProjectName();
|
||||||
this.props.hideEditProjectName();
|
this.props.hideEditProjectName();
|
||||||
|
if (this.props.project.id) {
|
||||||
|
this.props.saveProject();
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
onKeyPress={this.handleKeyPress}
|
onKeyPress={this.handleKeyPress}
|
||||||
/>
|
/>
|
||||||
|
@ -142,14 +145,16 @@ Toolbar.propTypes = {
|
||||||
}),
|
}),
|
||||||
project: PropTypes.shape({
|
project: PropTypes.shape({
|
||||||
name: PropTypes.string.isRequired,
|
name: PropTypes.string.isRequired,
|
||||||
isEditingName: PropTypes.bool
|
isEditingName: PropTypes.bool,
|
||||||
|
id: PropTypes.string
|
||||||
}).isRequired,
|
}).isRequired,
|
||||||
showEditProjectName: PropTypes.func.isRequired,
|
showEditProjectName: PropTypes.func.isRequired,
|
||||||
hideEditProjectName: PropTypes.func.isRequired,
|
hideEditProjectName: PropTypes.func.isRequired,
|
||||||
infiniteLoop: PropTypes.bool.isRequired,
|
infiniteLoop: PropTypes.bool.isRequired,
|
||||||
autorefresh: PropTypes.bool.isRequired,
|
autorefresh: PropTypes.bool.isRequired,
|
||||||
setAutorefresh: PropTypes.func.isRequired,
|
setAutorefresh: PropTypes.func.isRequired,
|
||||||
startSketchAndRefresh: PropTypes.func.isRequired
|
startSketchAndRefresh: PropTypes.func.isRequired,
|
||||||
|
saveProject: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Toolbar;
|
export default Toolbar;
|
||||||
|
|
|
@ -196,6 +196,7 @@ class IDEView extends React.Component {
|
||||||
autorefresh={this.props.preferences.autorefresh}
|
autorefresh={this.props.preferences.autorefresh}
|
||||||
setAutorefresh={this.props.setAutorefresh}
|
setAutorefresh={this.props.setAutorefresh}
|
||||||
startSketchAndRefresh={this.props.startSketchAndRefresh}
|
startSketchAndRefresh={this.props.startSketchAndRefresh}
|
||||||
|
saveProject={this.props.saveProject}
|
||||||
/>
|
/>
|
||||||
<Preferences
|
<Preferences
|
||||||
isVisible={this.props.ide.preferencesIsVisible}
|
isVisible={this.props.ide.preferencesIsVisible}
|
||||||
|
|
Loading…
Reference in a new issue