fix #186
This commit is contained in:
parent
c7483b5d3a
commit
77e2f5bfff
2 changed files with 4 additions and 1 deletions
|
@ -92,7 +92,9 @@ class Editor extends React.Component {
|
|||
if (this.props.file.content !== prevProps.file.content &&
|
||||
this.props.file.content !== this._cm.getValue()) {
|
||||
this._cm.setValue(this.props.file.content); // eslint-disable-line no-underscore-dangle
|
||||
setTimeout(() => this.props.setUnsavedChanges(false), 500);
|
||||
if (!prevProps.unsavedChanges) {
|
||||
setTimeout(() => this.props.setUnsavedChanges(false), 400);
|
||||
}
|
||||
}
|
||||
if (this.props.fontSize !== prevProps.fontSize) {
|
||||
this._cm.getWrapperElement().style['font-size'] = `${this.props.fontSize}px`;
|
||||
|
|
|
@ -294,6 +294,7 @@ class IDEView extends React.Component {
|
|||
startRefreshSketch={this.props.startRefreshSketch}
|
||||
stopSketch={this.props.stopSketch}
|
||||
autorefresh={this.props.preferences.autorefresh}
|
||||
unsavedChanges={this.props.ide.unsavedChanges}
|
||||
/>
|
||||
<Console
|
||||
consoleEvent={this.props.ide.consoleEvent}
|
||||
|
|
Loading…
Reference in a new issue