mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fix some smaller issues
* #9253 Well allocation plot: Keep checked state of curves when changing time step * #9254 Guard pointer when clicking on linked time axis icon * #9250 Cross Plot : Ensure summary case change update both x and y data sources
This commit is contained in:
@@ -206,6 +206,8 @@ void RimWellAllocationPlot::deleteViewWidget()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellAllocationPlot::updateFromWell()
|
void RimWellAllocationPlot::updateFromWell()
|
||||||
{
|
{
|
||||||
|
std::set<QString> uncheckedCurveNames;
|
||||||
|
|
||||||
// Delete existing tracks
|
// Delete existing tracks
|
||||||
{
|
{
|
||||||
std::vector<RimWellLogTrack*> tracks;
|
std::vector<RimWellLogTrack*> tracks;
|
||||||
@@ -213,6 +215,14 @@ void RimWellAllocationPlot::updateFromWell()
|
|||||||
|
|
||||||
for ( RimWellLogTrack* t : tracks )
|
for ( RimWellLogTrack* t : tracks )
|
||||||
{
|
{
|
||||||
|
for ( auto c : t->curves() )
|
||||||
|
{
|
||||||
|
if ( !c->isCurveVisible() )
|
||||||
|
{
|
||||||
|
uncheckedCurveNames.insert( c->curveName() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
accumulatedWellFlowPlot()->removePlot( t );
|
accumulatedWellFlowPlot()->removePlot( t );
|
||||||
delete t;
|
delete t;
|
||||||
}
|
}
|
||||||
@@ -325,8 +335,8 @@ void RimWellAllocationPlot::updateFromWell()
|
|||||||
curveDepthValues.insert( curveDepthValues.begin(), curveDepthValues[0] );
|
curveDepthValues.insert( curveDepthValues.begin(), curveDepthValues[0] );
|
||||||
accFlow.insert( accFlow.begin(), 0.0 );
|
accFlow.insert( accFlow.begin(), 0.0 );
|
||||||
|
|
||||||
if ( m_flowType == ACCUMULATED && brIdx == 0 && !accFlow.empty() ) // Add fictitious point to -1 for
|
if ( m_flowType == ACCUMULATED && brIdx == 0 && !accFlow.empty() ) // Add fictitious point to -1
|
||||||
// first branch
|
// for first branch
|
||||||
{
|
{
|
||||||
accFlow.push_back( accFlow.back() );
|
accFlow.push_back( accFlow.back() );
|
||||||
curveDepthValues.push_back( -1.0 );
|
curveDepthValues.push_back( -1.0 );
|
||||||
@@ -378,8 +388,8 @@ void RimWellAllocationPlot::updateFromWell()
|
|||||||
|
|
||||||
if ( !accFlow.empty() )
|
if ( !accFlow.empty() )
|
||||||
{
|
{
|
||||||
addStackedCurve( tracerName, depthType, curveDepthValues, accFlow, plotTrack );
|
bool showCurve = uncheckedCurveNames.count( tracerName ) == 0;
|
||||||
// TODO: THIs is the data to be plotted...
|
addStackedCurve( tracerName, depthType, curveDepthValues, accFlow, plotTrack, showCurve );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -534,7 +544,8 @@ void RimWellAllocationPlot::addStackedCurve( const QString& tracerNa
|
|||||||
RiaDefines::DepthTypeEnum depthType,
|
RiaDefines::DepthTypeEnum depthType,
|
||||||
const std::vector<double>& depthValues,
|
const std::vector<double>& depthValues,
|
||||||
const std::vector<double>& accFlow,
|
const std::vector<double>& accFlow,
|
||||||
RimWellLogTrack* plotTrack )
|
RimWellLogTrack* plotTrack,
|
||||||
|
bool showCurve )
|
||||||
{
|
{
|
||||||
RimWellFlowRateCurve* curve = new RimWellFlowRateCurve;
|
RimWellFlowRateCurve* curve = new RimWellFlowRateCurve;
|
||||||
curve->setFlowValuesPrDepthValue( tracerName, depthType, depthValues, accFlow );
|
curve->setFlowValuesPrDepthValue( tracerName, depthType, depthValues, accFlow );
|
||||||
@@ -551,6 +562,7 @@ void RimWellAllocationPlot::addStackedCurve( const QString& tracerNa
|
|||||||
plotTrack->addCurve( curve );
|
plotTrack->addCurve( curve );
|
||||||
|
|
||||||
curve->loadDataAndUpdate( true );
|
curve->loadDataAndUpdate( true );
|
||||||
|
curve->setCurveVisibility( showCurve );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -117,7 +117,8 @@ private:
|
|||||||
RiaDefines::DepthTypeEnum depthType,
|
RiaDefines::DepthTypeEnum depthType,
|
||||||
const std::vector<double>& depthValues,
|
const std::vector<double>& depthValues,
|
||||||
const std::vector<double>& accFlow,
|
const std::vector<double>& accFlow,
|
||||||
RimWellLogTrack* plotTrack );
|
RimWellLogTrack* plotTrack,
|
||||||
|
bool showCurve );
|
||||||
|
|
||||||
void updateWidgetTitleWindowTitle();
|
void updateWidgetTitleWindowTitle();
|
||||||
static QString wellStatusTextForTimeStep( const QString& wellName,
|
static QString wellStatusTextForTimeStep( const QString& wellName,
|
||||||
|
|||||||
@@ -159,7 +159,15 @@ RimSummaryPlot::RimSummaryPlot( bool isCrossPlot )
|
|||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault( &m_sourceStepping, "SourceStepping", "" );
|
CAF_PDM_InitFieldNoDefault( &m_sourceStepping, "SourceStepping", "" );
|
||||||
m_sourceStepping = new RimSummaryPlotSourceStepping;
|
m_sourceStepping = new RimSummaryPlotSourceStepping;
|
||||||
|
if ( m_isCrossPlot )
|
||||||
|
{
|
||||||
|
m_sourceStepping->setSourceSteppingType( RimSummaryDataSourceStepping::Axis::UNION_X_Y_AXIS );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
m_sourceStepping->setSourceSteppingType( RimSummaryDataSourceStepping::Axis::Y_AXIS );
|
m_sourceStepping->setSourceSteppingType( RimSummaryDataSourceStepping::Axis::Y_AXIS );
|
||||||
|
}
|
||||||
|
|
||||||
m_sourceStepping->setSourceSteppingObject( this );
|
m_sourceStepping->setSourceSteppingObject( this );
|
||||||
m_sourceStepping.uiCapability()->setUiTreeHidden( true );
|
m_sourceStepping.uiCapability()->setUiTreeHidden( true );
|
||||||
m_sourceStepping.uiCapability()->setUiTreeChildrenHidden( true );
|
m_sourceStepping.uiCapability()->setUiTreeChildrenHidden( true );
|
||||||
|
|||||||
@@ -287,10 +287,13 @@ bool PdmUiTreeViewItemDelegate::editorEvent( QEvent* event,
|
|||||||
PdmFieldReorderCapability* reorderability =
|
PdmFieldReorderCapability* reorderability =
|
||||||
PdmFieldReorderCapability::reorderCapabilityOfParentContainer( pdmObject );
|
PdmFieldReorderCapability::reorderCapabilityOfParentContainer( pdmObject );
|
||||||
|
|
||||||
|
if ( reorderability )
|
||||||
|
{
|
||||||
size_t indexInParent = reorderability->indexOf( pdmObject );
|
size_t indexInParent = reorderability->indexOf( pdmObject );
|
||||||
tag->clicked.send( indexInParent );
|
tag->clicked.send( indexInParent );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool notifyEditors = true;
|
bool notifyEditors = true;
|
||||||
m_treeView->updateSubTree( parentUiItem, notifyEditors );
|
m_treeView->updateSubTree( parentUiItem, notifyEditors );
|
||||||
|
|||||||
Reference in New Issue
Block a user