forked from qt-creator/qt-creator
Make sure bookmarks survive a document reload
While reloading a text document, the bookmarks got lost since their associated QTextBlocks were deleted. This patch makes sure that before reloading, the bookmarks are removed non-persistently in the same way as when closing a document, and that they are restored after the document was reloaded. Currently, no effort is made to update the location of the bookmarks based on the way the file changed. Task-number: QTCREATORBUG-1281 Reviewed-by: dt
This commit is contained in:
@@ -203,7 +203,9 @@ void ResourceEditorFile::reload(ReloadFlag flag, ChangeType type)
|
||||
if (type == TypePermissions) {
|
||||
emit changed();
|
||||
} else {
|
||||
m_parent->open(m_parent->m_resourceEditor->fileName());
|
||||
emit aboutToReload();
|
||||
if (m_parent->open(m_parent->m_resourceEditor->fileName()))
|
||||
emit reloaded();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user