| 1728 | } |
| 1729 | |
| 1730 | bool DebuggerPlugin::breakpointSetEnabled( const std::string& doc, Uint32 lineNumber, |
| 1731 | bool enabled ) { |
| 1732 | if ( mChangingBreakpoint ) |
| 1733 | return false; |
| 1734 | BoolScopedOp changing( mChangingBreakpoint, true ); |
| 1735 | Lock l( mBreakpointsMutex ); |
| 1736 | auto& breakpoints = mBreakpoints[doc]; |
| 1737 | SourceBreakpointStateful sb( lineNumber ); |
| 1738 | auto breakpointIt = breakpoints.find( sb ); |
| 1739 | if ( breakpointIt != breakpoints.end() ) { |
| 1740 | if ( enabled != breakpointIt->enabled ) { |
| 1741 | breakpointIt->enabled = enabled; |
| 1742 | mBreakpointsModel->enable( doc, lineNumber, enabled ); |
| 1743 | mThreadPool->run( [this, doc] { sendFileBreakpoints( doc ); } ); |
| 1744 | getUISceneNode()->getRoot()->invalidateDraw(); |
| 1745 | } |
| 1746 | return true; |
| 1747 | } |
| 1748 | return false; |
| 1749 | } |
| 1750 | |
| 1751 | bool DebuggerPlugin::breakpointToggleEnabled( const std::string& doc, Uint32 lineNumber ) { |
| 1752 | Lock l( mBreakpointsMutex ); |