forked from qt-creator/qt-creator
Editor: Allow to hide annotations for a group of text marks
The hiding is not persistent, so on the next Qt Creator start all annotations are visible again. This is meant to quickly get rid of annotations if there are to many irrelevant of a specific kind. Change-Id: I4862e56e0f5624f30aadda26efc9dea672ab1f57 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -4043,8 +4043,9 @@ void TextEditorWidgetPrivate::updateLineAnnotation(const PaintEventData &data,
|
||||
if (!blockUserData)
|
||||
return;
|
||||
|
||||
TextMarks marks = Utils::filtered(blockUserData->marks(), [](const TextMark* mark){
|
||||
return !mark->lineAnnotation().isEmpty() && mark->isVisible();
|
||||
TextMarks marks = Utils::filtered(blockUserData->marks(), [](const TextMark *mark) {
|
||||
return !mark->lineAnnotation().isEmpty() && mark->isVisible()
|
||||
&& !TextDocument::marksAnnotationHidden(mark->category().id);
|
||||
});
|
||||
|
||||
const bool annotationsVisible = !marks.isEmpty();
|
||||
@@ -6603,7 +6604,7 @@ void TextEditorWidgetPrivate::addSearchResultsToScrollBar(const QVector<SearchRe
|
||||
|
||||
Highlight markToHighlight(TextMark *mark, int lineNumber)
|
||||
{
|
||||
return Highlight(mark->category(),
|
||||
return Highlight(mark->category().id,
|
||||
lineNumber,
|
||||
mark->color().value_or(Utils::Theme::TextColorNormal),
|
||||
textMarkPrioToScrollBarPrio(mark->priority()));
|
||||
|
||||
Reference in New Issue
Block a user