Commit 7ccea4de authored by Daniel Teske's avatar Daniel Teske

Remove marks from registry on deletion

Change-Id: Id997113ddb224fd079e70dcc5803bc1c2a657874
Reviewed-by: default avatarEike Ziller <eike.ziller@nokia.com>
parent c85a4563
......@@ -69,6 +69,11 @@ void BaseTextMarkRegistry::add(BaseTextMark *mark)
}
}
void BaseTextMarkRegistry::remove(BaseTextMark *mark)
{
m_marks[Utils::FileName::fromString(mark->fileName())].removeOne(mark);
}
void BaseTextMarkRegistry::editorOpened(Core::IEditor *editor)
{
ITextEditor *textEditor = qobject_cast<ITextEditor *>(editor);
......@@ -120,6 +125,7 @@ BaseTextMark::~BaseTextMark()
if (m_markableInterface)
m_markableInterface.data()->removeMark(this);
m_markableInterface.clear();
Internal::TextEditorPlugin::instance()->baseTextMarkRegistry()->remove(this);
}
void BaseTextMark::updateMarker()
......
......@@ -82,6 +82,7 @@ public:
BaseTextMarkRegistry(QObject *parent);
void add(BaseTextMark *mark);
void remove(BaseTextMark *mark);
private slots:
void editorOpened(Core::IEditor *editor);
void documentReloaded();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment