aboutsummaryrefslogtreecommitdiff
path: root/src/QuickMedia.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/QuickMedia.cpp')
-rw-r--r--src/QuickMedia.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index 9dd8c25..174d779 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -2179,11 +2179,13 @@ namespace QuickMedia {
});
}
} else if(event.key.code == sf::Keyboard::B && event.key.control) {
- BodyItem *selected_item = tabs[selected_tab].body->get_selected();
- if(selected_item) {
+ auto bookmark_item = tabs[selected_tab].page->get_bookmark_body_item();
+ if(!bookmark_item)
+ bookmark_item = tabs[selected_tab].body->get_selected_shared();
+ if(bookmark_item) {
const char *bookmark_name = tabs[selected_tab].page->get_bookmark_name();
if(bookmark_name) {
- if(toggle_bookmark(selected_item, bookmark_name)) {
+ if(toggle_bookmark(bookmark_item.get(), bookmark_name)) {
for(Tab &tab : tabs) {
if(tab.page && tab.page->is_bookmark_page())
tab.page->needs_refresh = true;