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
@ -200,7 +200,10 @@ void PdmUiTableViewEditor::configureAndUpdateUi(const QString& uiConfigName)
|
|||||||
{
|
{
|
||||||
m_tableView->setMinimumHeight(editorAttrib.minimumHeight);
|
m_tableView->setMinimumHeight(editorAttrib.minimumHeight);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( m_previousFieldHandle != childArrayFH || editorAttrib.forceColumnWidthResize )
|
||||||
|
{
|
||||||
// Set default column widths
|
// Set default column widths
|
||||||
m_tableView->resizeColumnsToContents();
|
m_tableView->resizeColumnsToContents();
|
||||||
|
|
||||||
@ -215,9 +218,9 @@ void PdmUiTableViewEditor::configureAndUpdateUi(const QString& uiConfigName)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_previousFieldHandle = childArrayFH;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_previousFieldHandle = childArrayFH;
|
||||||
|
|
||||||
// Set default row heights
|
// Set default row heights
|
||||||
m_tableView->resizeRowsToContents();
|
m_tableView->resizeRowsToContents();
|
||||||
|
@ -85,6 +85,7 @@ public:
|
|||||||
: selectionLevel(1)
|
: selectionLevel(1)
|
||||||
, enableHeaderText(true)
|
, enableHeaderText(true)
|
||||||
, minimumHeight(-1)
|
, minimumHeight(-1)
|
||||||
|
, forceColumnWidthResize(false)
|
||||||
{
|
{
|
||||||
QPalette myPalette;
|
QPalette myPalette;
|
||||||
baseColor = myPalette.color(QPalette::Active, QPalette::Base);
|
baseColor = myPalette.color(QPalette::Active, QPalette::Base);
|
||||||
@ -95,7 +96,7 @@ public:
|
|||||||
std::vector<int> columnWidths;
|
std::vector<int> columnWidths;
|
||||||
int minimumHeight; ///< Not used if If < 0
|
int minimumHeight; ///< Not used if If < 0
|
||||||
QColor baseColor;
|
QColor baseColor;
|
||||||
|
bool forceColumnWidthResize;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user