Only restrict Highlight color for whispers in messages tab (#2937)
This fixes a bug, where changing color of the second row in Users tab in Highlights settings page was not possible.
This commit is contained in:
@@ -349,12 +349,14 @@ void HighlightingPage::tableCellClicked(const QModelIndex &clicked,
|
|||||||
case HighlightTab::Messages:
|
case HighlightTab::Messages:
|
||||||
case HighlightTab::Users: {
|
case HighlightTab::Users: {
|
||||||
using Column = HighlightModel::Column;
|
using Column = HighlightModel::Column;
|
||||||
|
bool restrictColorRow =
|
||||||
|
(tab == HighlightTab::Messages &&
|
||||||
|
clicked.row() == HighlightModel::WHISPER_ROW);
|
||||||
if (clicked.column() == Column::SoundPath)
|
if (clicked.column() == Column::SoundPath)
|
||||||
{
|
{
|
||||||
this->openSoundDialog(clicked, view, Column::SoundPath);
|
this->openSoundDialog(clicked, view, Column::SoundPath);
|
||||||
}
|
}
|
||||||
else if (clicked.column() == Column::Color &&
|
else if (clicked.column() == Column::Color && !restrictColorRow)
|
||||||
clicked.row() != HighlightModel::WHISPER_ROW)
|
|
||||||
{
|
{
|
||||||
this->openColorDialog(clicked, view, tab);
|
this->openColorDialog(clicked, view, tab);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user