Fix BSSourceView not re-drawing when the marked line or breakpoints change.
authorRobert Sesek <rsesek@bluestatic.org>
Wed, 30 Nov 2016 02:38:26 +0000 (21:38 -0500)
committerRobert Sesek <rsesek@bluestatic.org>
Wed, 30 Nov 2016 02:38:26 +0000 (21:38 -0500)
Source/BSSourceView.h
Source/BSSourceView.mm
Source/BreakpointController.m

index 189085a3aeecf9f37a007f0823376fc00dbbd203..c3101139ea04ba6ab4db421550ae8a49a06540d5 100644 (file)
   id<BSSourceViewDelegate> delegate_;
 }
 
-@property (readonly) NSTextView* textView;
-@property (readonly) NSScrollView* scrollView;
-@property (retain) NSSet* markers;
+@property (nonatomic, readonly) NSTextView* textView;
+@property (nonatomic, readonly) NSScrollView* scrollView;
+@property (nonatomic, retain) NSSet* markers;
 @property (nonatomic, assign) NSString* file;
-@property (assign) NSUInteger markedLine;
-@property (assign) id delegate;
+@property (nonatomic, assign) NSUInteger markedLine;
+@property (nonatomic, assign) id delegate;
 
 - (void)setFile:(NSString*)f;
 - (void)setString:(NSString*)source asFile:(NSString*)path;
index 8669d9e91f25114b239ab3abcb5187b8187f7f41..0e0bc0e7027e26d4701709373fc497043738e64f 100644 (file)
   [super dealloc];
 }
 
+- (void)setMarkers:(NSSet*)markers {
+  [markers_ release];
+  markers_ = [markers copy];
+
+  [ruler_ setNeedsDisplay:YES];
+}
+
+- (void)setMarkedLine:(NSUInteger)markedLine {
+  markedLine_ = markedLine;
+  [ruler_ setNeedsDisplay:YES];
+}
+
 /**
  * Sets the file name as well as the text of the source view
  */
index f6b90283cfa414466b17466b73c301602a630a2b..3f618117de9b3382ee871639d2edb9b09db919aa 100644 (file)
   }
   
   [sourceView setMarkers:[NSSet setWithArray:[manager breakpointsForFile:file]]];
-  [sourceView setNeedsDisplay:YES];
 }
 
 /**