Commit d672269c authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

Make columns in pqOutputWidget non-editable.

The first column (the column that showed the count for the messages)
was accidentally editable i.e. user could double click on it to change
text. Fixed that.
parent 2cd7ea62
......@@ -180,6 +180,13 @@ class pqOutputWidget::pqInternals
static const int COLUMN_COUNT = 1;
static const int COLUMN_DATA = 0;
static QStandardItem* newEmptyItem()
{
auto item = new QStandardItem();
item->setFlags(item->flags() ^ Qt::ItemIsEditable);
return item;
}
public:
Ui::OutputWidget Ui;
QPointer<QStandardItemModel> Model;
......@@ -263,11 +270,11 @@ public:
messageItem->setForeground(this->foregroundColor(type));
QList<QStandardItem*> items;
items << messageItem << new QStandardItem();
items << messageItem << this->newEmptyItem();
summaryItem->appendRow(items);
items.clear();
items << summaryItem << new QStandardItem();
items << summaryItem << this->newEmptyItem();
rootItem->appendRow(items);
}
......
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