Advertisement
Guest User

Untitled

a guest
May 26th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.26 KB | None | 0 0
  1. diff --git a/public/js/actions/pause.js b/public/js/actions/pause.js
  2. index edb7e25..dbb8649 100644
  3. --- a/public/js/actions/pause.js
  4. +++ b/public/js/actions/pause.js
  5. @@ -20,7 +20,12 @@ function resumed() {
  6. */
  7. function paused(pauseInfo) {
  8. return ({ dispatch, getState, threadClient }) => {
  9. - dispatch(selectSource(pauseInfo.frame.location.sourceId));
  10. +
  11. + const location = pauseInfo.frame.location;
  12. + dispatch(selectSource(location.sourceId, {
  13. + line: location.line
  14. + }));
  15. +
  16. dispatch({
  17. type: constants.PAUSED,
  18. pauseInfo: pauseInfo
  19. diff --git a/public/js/components/Editor.js b/public/js/components/Editor.js
  20. index 8acfa98..35f882d 100644
  21. --- a/public/js/components/Editor.js
  22. +++ b/public/js/components/Editor.js
  23. @@ -28,8 +28,7 @@ const Editor = React.createClass({
  24. selectedSourceOpts: PropTypes.object,
  25. sourceText: PropTypes.object,
  26. addBreakpoint: PropTypes.func,
  27. - removeBreakpoint: PropTypes.func,
  28. - pause: PropTypes.object
  29. + removeBreakpoint: PropTypes.func
  30. },
  31.  
  32. componentDidMount() {
  33. @@ -100,12 +99,6 @@ const Editor = React.createClass({
  34. this.setSourceText(nextProps.sourceText, this.props.sourceText);
  35. }
  36.  
  37. - let pause = this.props.pause;
  38. -
  39. - if (pause) {
  40. - this.clearDebugLine(pause.getIn(["frame", "location", "line"]));
  41. - }
  42. -
  43. if (this.props.selectedSourceOpts &&
  44. this.props.selectedSourceOpts.get("line")) {
  45. this.clearDebugLine(this.props.selectedSourceOpts.get("line"));
  46. @@ -114,9 +107,6 @@ const Editor = React.createClass({
  47. if (nextProps.selectedSourceOpts &&
  48. nextProps.selectedSourceOpts.get("line")) {
  49. this.setDebugLine(nextProps.selectedSourceOpts.get("line"));
  50. - } else if (nextProps.pause &&
  51. - !nextProps.pause.get("isInterrupted")) {
  52. - this.setDebugLine(nextProps.pause.getIn(["frame", "location", "line"]));
  53. }
  54. },
  55.  
  56. @@ -152,8 +142,7 @@ module.exports = connect(
  57. selectedSource: selectedSource,
  58. selectedSourceOpts: getSelectedSourceOpts(state),
  59. sourceText: getSourceText(state, selectedId),
  60. - breakpoints: getBreakpointsForSource(state, selectedId),
  61. - pause: getPause(state)
  62. + breakpoints: getBreakpointsForSource(state, selectedId)
  63. };
  64. },
  65. dispatch => bindActionCreators(actions, dispatch)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement