Add copy/paste of Summary Multi Plot (#8942)

* Guard use of back() on empty vector
* Add "Show Data Sources" to ensemble realizations
* Update summary plot as summary curve collection is not visible in tree view
* Set selection manager root in RiaApplication
* Always close both main windows if present
* Add copy/paste of summary multi plot
* Add test for RiuMainWindow::instance() before use
* Remove duplicated code
* Multiple Tree Views : Use getTreeViewWithItem() to find correct tree view
* Minor UI adjustments
This commit is contained in:
Magne Sjaastad
2022-05-23 14:25:53 +02:00
committed by GitHub
parent 329e1e8b69
commit 01e670a3d8
30 changed files with 417 additions and 100 deletions

View File

@@ -30,6 +30,7 @@
#include "RimGridCrossPlotDataSet.h"
#include "RimMimeData.h"
#include "RimModeledWellPath.h"
#include "RimSummaryMultiPlot.h"
#include "RimSummaryPlot.h"
#include "RimWellAllocationPlot.h"
#include "RimWellLogPlot.h"
@@ -124,63 +125,37 @@ bool RicCopyReferencesToClipboardFeature::isAnyCopyableObjectSelected()
//--------------------------------------------------------------------------------------------------
bool RicCopyReferencesToClipboardFeature::isCopyOfObjectSupported( caf::PdmObject* pdmObject )
{
// Copy support based on direct dynamic cast
if ( dynamic_cast<RimGeoMechView*>( pdmObject ) ) return true;
if ( dynamic_cast<RimEclipseView*>( pdmObject ) ) return true;
if ( dynamic_cast<RimEclipseCase*>( pdmObject ) ) return true;
if ( dynamic_cast<RimExtrudedCurveIntersection*>( pdmObject ) ) return true;
if ( dynamic_cast<RimBoxIntersection*>( pdmObject ) ) return true;
if ( dynamic_cast<RimSummaryPlot*>( pdmObject ) ) return true;
if ( dynamic_cast<RimFractureTemplate*>( pdmObject ) ) return true;
if ( dynamic_cast<RimEnsembleCurveSet*>( pdmObject ) ) return true;
if ( dynamic_cast<RimGridCrossPlotDataSet*>( pdmObject ) ) return true;
if ( dynamic_cast<RimModeledWellPath*>( pdmObject ) ) return true;
if ( dynamic_cast<RimSummaryMultiPlot*>( pdmObject ) ) return true;
// Copy support based combined logic
RimWellAllocationPlot* wellAllocPlot = nullptr;
RimWellRftPlot* rftPlot = nullptr;
pdmObject->firstAncestorOrThisOfType( wellAllocPlot );
pdmObject->firstAncestorOrThisOfType( rftPlot );
if ( dynamic_cast<RimGeoMechView*>( pdmObject ) )
{
return true;
}
else if ( dynamic_cast<RimEclipseView*>( pdmObject ) )
{
return true;
}
else if ( dynamic_cast<RimEclipseCase*>( pdmObject ) )
{
return true;
}
else if ( dynamic_cast<RimExtrudedCurveIntersection*>( pdmObject ) )
{
return true;
}
else if ( dynamic_cast<RimBoxIntersection*>( pdmObject ) )
{
return true;
}
else if ( dynamic_cast<RimSummaryPlot*>( pdmObject ) )
{
return true;
}
else if ( dynamic_cast<RimPlotCurve*>( pdmObject ) && !dynamic_cast<RimGridCrossPlotCurve*>( pdmObject ) )
if ( dynamic_cast<RimPlotCurve*>( pdmObject ) && !dynamic_cast<RimGridCrossPlotCurve*>( pdmObject ) )
{
if ( !rftPlot ) return true;
}
else if ( dynamic_cast<RimWellLogTrack*>( pdmObject ) )
if ( dynamic_cast<RimWellLogTrack*>( pdmObject ) )
{
if ( !wellAllocPlot && !rftPlot ) return true;
}
else if ( dynamic_cast<RimWellLogPlot*>( pdmObject ) )
if ( dynamic_cast<RimWellLogPlot*>( pdmObject ) )
{
if ( !wellAllocPlot && !rftPlot ) return true;
}
else if ( dynamic_cast<RimFractureTemplate*>( pdmObject ) )
{
return true;
}
else if ( dynamic_cast<RimEnsembleCurveSet*>( pdmObject ) )
{
return true;
}
else if ( dynamic_cast<RimGridCrossPlotDataSet*>( pdmObject ) )
{
return true;
}
else if ( dynamic_cast<RimModeledWellPath*>( pdmObject ) )
{
return true;
}
return false;
}