ui: Create bookmarks from graph context menu for node under mouse cursor (issue #373)

bug id = 373
This commit is contained in:
Eberhard Graether
2017-05-15 00:45:50 +02:00
parent 6de0021f70
commit c94b5f34a3
13 changed files with 103 additions and 64 deletions
+3 -2
View File
@@ -191,7 +191,7 @@ void QtBookmarkView::displayBookmarks(const std::vector<std::shared_ptr<Bookmark
);
}
void QtBookmarkView::displayBookmarkCreator(const std::vector<std::string>& names, const std::vector<BookmarkCategory>& categories)
void QtBookmarkView::displayBookmarkCreator(const std::vector<std::string>& names, const std::vector<BookmarkCategory>& categories, Id nodeId)
{
m_onQtThread(
[=]()
@@ -213,6 +213,8 @@ void QtBookmarkView::displayBookmarkCreator(const std::vector<std::string>& name
bookmarkCreator->setDisplayName(displayName);
bookmarkCreator->setBookmarkCategories(categories);
bookmarkCreator->setNodeId(nodeId);
bookmarkCreator->show();
bookmarkCreator->raise();
}
@@ -230,7 +232,6 @@ void QtBookmarkView::displayBookmarkEditor(std::shared_ptr<Bookmark> bookmark, c
bookmarkCreator->setComment(bookmark->getComment());
bookmarkCreator->setBookmarkCategories(categories);
bookmarkCreator->setCurrentBookmarkCategory(bookmark->getCategory());
bookmarkCreator->setIsEdge((dynamic_cast<EdgeBookmark*>(bookmark.get()) != nullptr));
bookmarkCreator->show();
bookmarkCreator->raise();
+1 -1
View File
@@ -35,7 +35,7 @@ private slots:
private:
virtual void displayBookmarks(const std::vector<std::shared_ptr<Bookmark>>& bookmarks);
virtual void displayBookmarkCreator(const std::vector<std::string>& names, const std::vector<BookmarkCategory>& categories);
virtual void displayBookmarkCreator(const std::vector<std::string>& names, const std::vector<BookmarkCategory>& categories, Id nodeId);
virtual void displayBookmarkEditor(std::shared_ptr<Bookmark> bookmark, const std::vector<BookmarkCategory>& categories);
void setStyleSheet();