mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4282 Remove horizontal scrollbar from result property list
This commit is contained in:
parent
0110e9a0c3
commit
fccb363f53
@ -1351,6 +1351,14 @@ void RimEclipseResultDefinition::defineEditorAttribute(const caf::PdmFieldHandle
|
||||
}
|
||||
}
|
||||
}
|
||||
if (field == &m_resultVariableUiField)
|
||||
{
|
||||
caf::PdmUiListEditorAttribute* listEditAttr = dynamic_cast<caf::PdmUiListEditorAttribute*>(attribute);
|
||||
if (listEditAttr)
|
||||
{
|
||||
listEditAttr->m_allowHorizontalScrollBar = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -206,6 +206,10 @@ void PdmUiListEditor::configureAndUpdateUi(const QString& uiConfigName)
|
||||
|
||||
m_listView->setPalette(myPalette);
|
||||
m_listView->setHeightHint(attributes.m_heightHint);
|
||||
if (!attributes.m_allowHorizontalScrollBar)
|
||||
{
|
||||
m_listView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
}
|
||||
}
|
||||
|
||||
MyStringListModel* strListModel = dynamic_cast<MyStringListModel*>(m_model.data());
|
||||
|
@ -57,6 +57,7 @@ class PdmUiListEditorAttribute : public PdmUiEditorAttribute
|
||||
public:
|
||||
PdmUiListEditorAttribute()
|
||||
: m_heightHint(2000)
|
||||
, m_allowHorizontalScrollBar(true)
|
||||
{
|
||||
QPalette myPalette;
|
||||
|
||||
@ -66,6 +67,7 @@ public:
|
||||
public:
|
||||
QColor m_baseColor;
|
||||
int m_heightHint;
|
||||
bool m_allowHorizontalScrollBar;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user