mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge from origin
This commit is contained in:
parent
6f37a731fc
commit
a4bcbf6115
@ -54,19 +54,19 @@
|
|||||||
class MySortFilterProxyModel : public QSortFilterProxyModel
|
class MySortFilterProxyModel : public QSortFilterProxyModel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MySortFilterProxyModel(QObject *parent = 0)
|
MySortFilterProxyModel(QObject *parent = 0)
|
||||||
: QSortFilterProxyModel(parent)
|
: QSortFilterProxyModel(parent)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void notifyModelChanged()
|
void notifyModelChanged()
|
||||||
{
|
{
|
||||||
QModelIndex startModelIdx = index(0,0);
|
QModelIndex startModelIdx = index(0,0);
|
||||||
QModelIndex endModelIdx = index(rowCount(startModelIdx), 0);
|
QModelIndex endModelIdx = index(rowCount(startModelIdx), 0);
|
||||||
|
|
||||||
emit dataChanged(startModelIdx, endModelIdx);
|
emit dataChanged(startModelIdx, endModelIdx);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -112,7 +112,7 @@ QWidget* PdmUiTreeViewEditor::createWidget(QWidget* parent)
|
|||||||
m_proxyTreeModelPdm->setSourceModel(m_treeModelPdm);
|
m_proxyTreeModelPdm->setSourceModel(m_treeModelPdm);
|
||||||
m_treeView->setModel(m_proxyTreeModelPdm);
|
m_treeView->setModel(m_proxyTreeModelPdm);
|
||||||
|
|
||||||
m_treeView->setSortingEnabled(true);
|
m_treeView->setSortingEnabled(true);
|
||||||
m_treeView->sortByColumn(1, Qt::AscendingOrder);
|
m_treeView->sortByColumn(1, Qt::AscendingOrder);
|
||||||
|
|
||||||
|
|
||||||
|
@ -503,7 +503,7 @@ void UiTreeModelPdm::notifyModelChanged()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
QVariant UiTreeModelPdm::headerData(int section, Qt::Orientation orientation, int role /*= Qt::DisplayRole */) const
|
QVariant UiTreeModelPdm::headerData(int section, Qt::Orientation orientation, int role /*= Qt::DisplayRole */) const
|
||||||
{
|
{
|
||||||
if (role != Qt::DisplayRole)
|
if (role != Qt::DisplayRole)
|
||||||
return QVariant();
|
return QVariant();
|
||||||
|
|
||||||
if (section < m_columnHeaders.size())
|
if (section < m_columnHeaders.size())
|
||||||
|
Loading…
Reference in New Issue
Block a user