Add RimVfpTableData used to represent connection to file and data

Extract data management from RimVfpPlot. Use pointer from RimVfpPlot to RimVfpTableData.
This commit is contained in:
Magne Sjaastad committed 2024-05-13 15:45:55 +02:00
1 parent b8391e6f92
commit ff9b13163a
28 files changed
+1591 -717

No files matched your search

@@ -27,6 +27,7 @@
#include "RimWellPathFractureCollection.h"
#include "cafPdmUiItem.h"
#include "cafPdmUiObjectHandle.h"
#include "cafSelectionManager.h"
#include <QAction>
@@ -115,6 +116,14 @@ bool RicDeleteSubItemsFeature::hasDeletableSubItems( caf::PdmUiItem* uiItem )
}
}
{
auto collection = dynamic_cast<RimPlotCollection*>( uiItem );
if ( collection && collection->plotCount() > 0 )
{
return true;
}
}
return false;
}
@@ -227,5 +236,18 @@ void RicDeleteSubItemsFeature::deleteSubItems( bool onlyDeleteUnchecked )
if ( proj ) proj->reloadCompletionTypeResultsInAllViews();
}
}
{
auto collection = dynamic_cast<RimPlotCollection*>( item );
if ( collection )
{
collection->deleteAllPlots();
if ( auto objHandle = dynamic_cast<caf::PdmUiObjectHandle*>( item ) )
{
objHandle->updateConnectedEditors();
}
}
}
}
}