mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3290 caf: Add force column resize attribute
This commit is contained in:
parent
9fe5631fe2
commit
015bb1719a
@ -194,13 +194,16 @@ void PdmUiTableViewEditor::configureAndUpdateUi(const QString& uiConfigName)
|
||||
m_tableHeadingIcon->setPixmap(QPixmap());
|
||||
}
|
||||
|
||||
if (m_previousFieldHandle != childArrayFH)
|
||||
if (m_previousFieldHandle != childArrayFH )
|
||||
{
|
||||
if (editorAttrib.minimumHeight > 0)
|
||||
{
|
||||
m_tableView->setMinimumHeight(editorAttrib.minimumHeight);
|
||||
}
|
||||
}
|
||||
|
||||
if ( m_previousFieldHandle != childArrayFH || editorAttrib.forceColumnWidthResize )
|
||||
{
|
||||
// Set default column widths
|
||||
m_tableView->resizeColumnsToContents();
|
||||
|
||||
@ -215,9 +218,9 @@ void PdmUiTableViewEditor::configureAndUpdateUi(const QString& uiConfigName)
|
||||
}
|
||||
}
|
||||
|
||||
m_previousFieldHandle = childArrayFH;
|
||||
}
|
||||
|
||||
m_previousFieldHandle = childArrayFH;
|
||||
|
||||
// Set default row heights
|
||||
m_tableView->resizeRowsToContents();
|
||||
|
@ -85,6 +85,7 @@ public:
|
||||
: selectionLevel(1)
|
||||
, enableHeaderText(true)
|
||||
, minimumHeight(-1)
|
||||
, forceColumnWidthResize(false)
|
||||
{
|
||||
QPalette myPalette;
|
||||
baseColor = myPalette.color(QPalette::Active, QPalette::Base);
|
||||
@ -95,7 +96,7 @@ public:
|
||||
std::vector<int> columnWidths;
|
||||
int minimumHeight; ///< Not used if If < 0
|
||||
QColor baseColor;
|
||||
|
||||
bool forceColumnWidthResize;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user