diff options
| author | nyamatongwe <devnull@localhost> | 2010-07-07 03:23:11 +0000 | 
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2010-07-07 03:23:11 +0000 | 
| commit | e22f3adce3febfcf393dd955ff4fbd7c9450eae4 (patch) | |
| tree | bef1c6a09a5d08fabab930f9347cbc37eb1c1e68 /src/Document.cxx | |
| parent | 868cce0d1a4c856934a2380cb748782b11f95126 (diff) | |
| download | scintilla-mirror-e22f3adce3febfcf393dd955ff4fbd7c9450eae4.tar.gz | |
Redraw when annotations change.
DeleteAllMarks will only cause a modification notification when a mark was actually deleted.
Diffstat (limited to 'src/Document.cxx')
| -rw-r--r-- | src/Document.cxx | 14 | 
1 files changed, 10 insertions, 4 deletions
| diff --git a/src/Document.cxx b/src/Document.cxx index bc3ae0979..08d35a893 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -192,12 +192,16 @@ void Document::DeleteMarkFromHandle(int markerHandle) {  }  void Document::DeleteAllMarks(int markerNum) { +	bool someChanges = false;  	for (int line = 0; line < LinesTotal(); line++) { -		static_cast<LineMarkers *>(perLineData[ldMarkers])->DeleteMark(line, markerNum, true); +		if (static_cast<LineMarkers *>(perLineData[ldMarkers])->DeleteMark(line, markerNum, true)) +			someChanges = true; +	} +	if (someChanges) { +		DocModification mh(SC_MOD_CHANGEMARKER, 0, 0, 0, 0); +		mh.line = -1; +		NotifyModified(mh);  	} -	DocModification mh(SC_MOD_CHANGEMARKER, 0, 0, 0, 0); -	mh.line = -1; -	NotifyModified(mh);  }  int Document::LineFromHandle(int markerHandle) { @@ -1430,6 +1434,8 @@ void Document::AnnotationSetText(int line, const char *text) {  void Document::AnnotationSetStyle(int line, int style) {  	static_cast<LineAnnotation *>(perLineData[ldAnnotation])->SetStyle(line, style); +	DocModification mh(SC_MOD_CHANGEANNOTATION, LineStart(line), 0, 0, 0, line); +	NotifyModified(mh);  }  void Document::AnnotationSetStyles(int line, const unsigned char *styles) { | 
