mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3271 Create Multiple Fractures. Summary field using empty space
This commit is contained in:
parent
bfcbb2132d
commit
9bff5881a3
@ -220,7 +220,7 @@ void RicCreateMultipleFracturesFeature::onActionTriggered(bool isChecked)
|
|||||||
|
|
||||||
m_dialog = &propertyDialog;
|
m_dialog = &propertyDialog;
|
||||||
|
|
||||||
propertyDialog.resize(QSize(700, 400));
|
propertyDialog.resize(QSize(700, 450));
|
||||||
|
|
||||||
QDialogButtonBox* dialogButtonBox = propertyDialog.dialogButtonBox();
|
QDialogButtonBox* dialogButtonBox = propertyDialog.dialogButtonBox();
|
||||||
|
|
||||||
|
@ -244,7 +244,6 @@ void RiuCreateMultipleFractionsUi::defineEditorAttribute(const caf::PdmFieldHand
|
|||||||
QFont font("Courier", 8);
|
QFont font("Courier", 8);
|
||||||
|
|
||||||
attr->font = font;
|
attr->font = font;
|
||||||
attr->heightHint = 100;
|
|
||||||
attr->wrapMode = caf::PdmUiTextEditorAttribute::NoWrap;
|
attr->wrapMode = caf::PdmUiTextEditorAttribute::NoWrap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -253,6 +252,7 @@ void RiuCreateMultipleFractionsUi::defineEditorAttribute(const caf::PdmFieldHand
|
|||||||
auto attr = dynamic_cast<caf::PdmUiTableViewEditorAttribute*>(attribute);
|
auto attr = dynamic_cast<caf::PdmUiTableViewEditorAttribute*>(attribute);
|
||||||
if (attr)
|
if (attr)
|
||||||
{
|
{
|
||||||
|
attr->minimumHeight = 130;
|
||||||
attr->columnWidths = { 90, 90, 400, 70 };
|
attr->columnWidths = { 90, 90, 400, 70 };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -191,20 +191,31 @@ void PdmUiTableViewEditor::configureAndUpdateUi(const QString& uiConfigName)
|
|||||||
|
|
||||||
if (m_previousFieldHandle != childArrayFH)
|
if (m_previousFieldHandle != childArrayFH)
|
||||||
{
|
{
|
||||||
|
if (editorAttrib.minimumHeight > 0)
|
||||||
|
{
|
||||||
|
m_tableView->setMinimumHeight(editorAttrib.minimumHeight);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set default column widths
|
||||||
m_tableView->resizeColumnsToContents();
|
m_tableView->resizeColumnsToContents();
|
||||||
m_tableView->resizeRowsToContents();
|
|
||||||
|
// Set specified widths (if any)
|
||||||
|
if (editorAttribLoaded)
|
||||||
|
{
|
||||||
|
int colCount = m_tableModelPdm->columnCount();
|
||||||
|
for (int c = 0; c < colCount && c < editorAttrib.columnWidths.size(); c++)
|
||||||
|
{
|
||||||
|
auto w = editorAttrib.columnWidths[c];
|
||||||
|
if (w > 0) m_tableView->setColumnWidth(c, w);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
m_previousFieldHandle = childArrayFH;
|
m_previousFieldHandle = childArrayFH;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (editorAttribLoaded)
|
|
||||||
{
|
// Set default row heights
|
||||||
int colCount = m_tableModelPdm->columnCount();
|
m_tableView->resizeRowsToContents();
|
||||||
for (int c = 0; c < colCount && c < editorAttrib.columnWidths.size(); c++)
|
|
||||||
{
|
|
||||||
auto w = editorAttrib.columnWidths[c];
|
|
||||||
if (w > 0) m_tableView->setColumnWidth(c, w);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -90,6 +90,7 @@ public:
|
|||||||
int selectionLevel;
|
int selectionLevel;
|
||||||
bool enableHeaderText;
|
bool enableHeaderText;
|
||||||
std::vector<int> columnWidths;
|
std::vector<int> columnWidths;
|
||||||
|
int minimumHeight;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user