mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Summary Multiplot: drag/drop updates (#8692)
Drag'n'drop improvements - accept drops in empty multiplot areas to create new plots
This commit is contained in:
@@ -92,7 +92,10 @@ void RimSummaryMultiPlot::addPlot( RimPlot* plot )
|
||||
{
|
||||
RimSummaryPlot* sumPlot = dynamic_cast<RimSummaryPlot*>( plot );
|
||||
CVF_ASSERT( sumPlot != nullptr );
|
||||
if ( sumPlot ) RimMultiPlot::addPlot( plot );
|
||||
if ( sumPlot )
|
||||
{
|
||||
RimMultiPlot::addPlot( plot );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -102,7 +105,36 @@ void RimSummaryMultiPlot::insertPlot( RimPlot* plot, size_t index )
|
||||
{
|
||||
RimSummaryPlot* sumPlot = dynamic_cast<RimSummaryPlot*>( plot );
|
||||
CVF_ASSERT( sumPlot != nullptr );
|
||||
if ( sumPlot ) RimMultiPlot::insertPlot( plot, index );
|
||||
if ( sumPlot )
|
||||
{
|
||||
RimMultiPlot::insertPlot( plot, index );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryMultiPlot::addPlot( const std::vector<caf::PdmObjectHandle*>& objects )
|
||||
{
|
||||
RimSummaryPlot* plot = new RimSummaryPlot();
|
||||
plot->enableAutoPlotTitle( true );
|
||||
|
||||
addPlot( plot );
|
||||
|
||||
plot->handleDroppedObjects( objects );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryMultiPlot::removePlot( RimPlot* plot )
|
||||
{
|
||||
RimSummaryPlot* sumPlot = dynamic_cast<RimSummaryPlot*>( plot );
|
||||
CVF_ASSERT( sumPlot != nullptr );
|
||||
if ( sumPlot )
|
||||
{
|
||||
RimMultiPlot::removePlot( plot );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user