diff options
author | Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com> | 2010-05-28 14:06:57 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com> | 2010-05-28 15:44:59 +0200 |
commit | 76020b61527db086e7b13fdad63ee5b43ff5f2b8 (patch) | |
tree | bd36d90a798e86411d8bbb69c480c9c167a289ef /src/plugins/resourceeditor | |
parent | a36d4b9b57762e2998feda565868a22a4e88dfa6 (diff) | |
download | qt-creator-76020b61527db086e7b13fdad63ee5b43ff5f2b8.tar.gz |
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
Diffstat (limited to 'src/plugins/resourceeditor')
-rw-r--r-- | src/plugins/resourceeditor/resourceeditorw.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/resourceeditor/resourceeditorw.cpp b/src/plugins/resourceeditor/resourceeditorw.cpp index 75f9fb2265..b37169bf77 100644 --- a/src/plugins/resourceeditor/resourceeditorw.cpp +++ b/src/plugins/resourceeditor/resourceeditorw.cpp @@ -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(); } } |