Editor: make sure to update marker on annotation change

Ensures an update for the markers editor widget after any of the
information displayed in the annotation has changed

Change-Id: I845e05f5103ee1615cfc3d7760cdfc2bbf510f32
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2022-03-11 13:20:57 +01:00
parent 851171f772
commit a8cad01887
5 changed files with 10 additions and 5 deletions

View File

@@ -348,11 +348,13 @@ void TextMark::setIcon(const QIcon &icon)
{
m_icon = icon;
m_iconProvider = std::function<QIcon()>();
updateMarker();
}
void TextMark::setIconProvider(const std::function<QIcon ()> &iconProvider)
{
m_iconProvider = iconProvider;
updateMarker();
}
const QIcon TextMark::icon() const
@@ -368,6 +370,13 @@ Utils::optional<Theme::Color> TextMark::color() const
void TextMark::setColor(const Theme::Color &color)
{
m_color = color;
updateMarker();
}
void TextMark::setLineAnnotation(const QString &lineAnnotation)
{
m_lineAnnotation = lineAnnotation;
updateMarker();
}
void TextMark::setToolTipProvider(const std::function<QString()> &toolTipProvider)