diff --git a/src/qtgui/bookmarkstaglist.cpp b/src/qtgui/bookmarkstaglist.cpp index d5db35aa9..d84350378 100644 --- a/src/qtgui/bookmarkstaglist.cpp +++ b/src/qtgui/bookmarkstaglist.cpp @@ -71,7 +71,8 @@ void BookmarksTagList::changeColor(int row, int /*column*/) return; info->color=color; - updateTags(); + item(row,0)->setBackground(color); + emit colorChanged(); Bookmarks::Get().save(); } diff --git a/src/qtgui/bookmarkstaglist.h b/src/qtgui/bookmarkstaglist.h index 45154822f..1135c9a42 100644 --- a/src/qtgui/bookmarkstaglist.h +++ b/src/qtgui/bookmarkstaglist.h @@ -42,6 +42,7 @@ class BookmarksTagList : public QTableWidget QMenu* popupMenu{nullptr}; signals: + void colorChanged(); public slots: void updateTags(); diff --git a/src/qtgui/dockbookmarks.cpp b/src/qtgui/dockbookmarks.cpp index d38dcffb4..8e262187a 100644 --- a/src/qtgui/dockbookmarks.cpp +++ b/src/qtgui/dockbookmarks.cpp @@ -109,6 +109,7 @@ DockBookmarks::DockBookmarks(QWidget *parent) : connect(buttonBox, SIGNAL(accepted()), tagsDialog, SLOT(accept())); connect(buttonBox, SIGNAL(rejected()), tagsDialog, SLOT(reject())); connect(dialogTaglist, SIGNAL(itemChanged(QTableWidgetItem *)), this, SLOT(dialog_tableWidgetTagList_itemChanged(QTableWidgetItem *))); + connect(dialogTaglist, SIGNAL(colorChanged()), this, SLOT(dialog_tableWidgetTagList_colorChanged())); QVBoxLayout *mainLayout = new QVBoxLayout(tagsDialog); mainLayout->addWidget(dialogTaglist); @@ -242,6 +243,11 @@ void DockBookmarks::dialog_tableWidgetTagList_itemChanged(QTableWidgetItem *item } } +void DockBookmarks::dialog_tableWidgetTagList_colorChanged() +{ + updateTags(); +} + bool DockBookmarks::eventFilter(QObject* object, QEvent* event) { if (event->type() == QEvent::KeyPress) diff --git a/src/qtgui/dockbookmarks.h b/src/qtgui/dockbookmarks.h index 836a919c8..6442579c2 100644 --- a/src/qtgui/dockbookmarks.h +++ b/src/qtgui/dockbookmarks.h @@ -89,6 +89,7 @@ private slots: //void on_delButton_clicked(); void on_tableWidgetTagList_itemChanged(QTableWidgetItem* item); void dialog_tableWidgetTagList_itemChanged(QTableWidgetItem *item); + void dialog_tableWidgetTagList_colorChanged(); void ShowContextMenu(const QPoint&pos); bool DeleteSelectedBookmark(); bool tuneHere();