Commit 9054cc18 authored by Vasiliy Sorokin's avatar Vasiliy Sorokin Committed by David Schulz
Browse files

Fixed bookmarks ordering.



Task-number: QTCREATORBUG-7923

Change-Id: I089d97abb1008f8dcedd31ceca9005c0050ed6ba
Reviewed-by: default avatarDavid Schulz <david.schulz@digia.com>
parent 3b80507a
......@@ -661,6 +661,8 @@ void BookmarkManager::moveUp()
QModelIndex bottomRight = current.sibling(current.row(), 2);
emit dataChanged(topLeft, bottomRight);
selectionModel()->setCurrentIndex(current.sibling(row, 0), QItemSelectionModel::Select | QItemSelectionModel::Clear);
saveBookmarks();
}
void BookmarkManager::moveDown()
......@@ -680,6 +682,8 @@ void BookmarkManager::moveDown()
QModelIndex bottomRight = current.sibling(row, 2);
emit dataChanged(topLeft, bottomRight);
selectionModel()->setCurrentIndex(current.sibling(row, 0), QItemSelectionModel::Select | QItemSelectionModel::Clear);
saveBookmarks();
}
void BookmarkManager::editNote(const QString &fileName, int lineNumber)
......@@ -705,6 +709,7 @@ void BookmarkManager::editNote()
if (inputOk) {
b->updateNote(noteText.replace(QLatin1Char('\t'), QLatin1Char(' ')));
emit dataChanged(current, current);
saveBookmarks();
}
}
......@@ -787,8 +792,7 @@ QString BookmarkManager::bookmarkToString(const Bookmark *b)
void BookmarkManager::saveBookmarks()
{
QStringList list;
foreach (const FileNameBookmarksMap *bookmarksMap, m_bookmarksMap)
foreach (const Bookmark *bookmark, *bookmarksMap)
foreach (const Bookmark *bookmark, m_bookmarksList)
list << bookmarkToString(bookmark);
sessionManager()->setValue("Bookmarks", list);
......
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