mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1018 Snapshots : Resize rows and columns to content
This commit is contained in:
parent
87f595a047
commit
69695ffa32
@ -46,7 +46,7 @@
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuExportMultipleSnapshotsWidget::RiuExportMultipleSnapshotsWidget(QWidget* parent, RimProject* project)
|
||||
: QDialog(parent),
|
||||
: QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
|
||||
m_rimProject(project)
|
||||
{
|
||||
setWindowTitle("Export Multiple Snapshots");
|
||||
@ -65,6 +65,8 @@ RiuExportMultipleSnapshotsWidget::RiuExportMultipleSnapshotsWidget(QWidget* pare
|
||||
connect(m_pdmTableView->tableView(), SIGNAL(customContextMenuRequested(QPoint)), SLOT(customMenuRequested(QPoint)));
|
||||
|
||||
m_pdmTableView->setListField(&(project->multiSnapshotDefinitions()));
|
||||
m_pdmTableView->tableView()->resizeRowsToContents();
|
||||
m_pdmTableView->tableView()->resizeColumnsToContents();
|
||||
|
||||
// Set active child array to be able to use generic delete
|
||||
caf::SelectionManager::instance()->setActiveChildArrayFieldHandle(&(project->multiSnapshotDefinitions()));
|
||||
@ -244,4 +246,10 @@ void RiuExportMultipleSnapshotsWidget::addSnapshotItem()
|
||||
|
||||
m_rimProject->multiSnapshotDefinitions.push_back(multiSnapshot);
|
||||
m_rimProject->multiSnapshotDefinitions.uiCapability()->updateConnectedEditors();
|
||||
|
||||
if (m_rimProject->multiSnapshotDefinitions.size() == 1)
|
||||
{
|
||||
m_pdmTableView->tableView()->resizeRowsToContents();
|
||||
m_pdmTableView->tableView()->resizeColumnsToContents();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user