#14083 Well Disks: Keep disk radius stable when toggling well visibility

Normalize disk radius over all wells instead of only the currently
visible ones. Computing the min/max range over visible wells only made
one well's disk radius depend on whether unrelated wells were filtered
out, so toggling a range filter on one well changed another well's disk.

Fixes #14083.
This commit is contained in:
Kristian Bendiksen committed 2026-06-01 08:19:44 +02:00
1 parent 326ae0d719
commit bd9172f33f
1 file changed
+2 -3
@@ -884,14 +884,13 @@ void RimSimWellInViewCollection::scaleWellDisks()
void RimSimWellInViewCollection::scaleWellDisksFromConfig( const RimWellDiskConfig& wellDiskConfig )
{
if ( !m_reservoirView ) return;
size_t frameIndex = static_cast<size_t>( m_reservoirView->currentTimeStep() );
// Compute the normalization range over all wells, independent of their current visibility. Using only the
// visible wells would make the disk radius of one well depend on whether other wells are filtered out (see #14083).
double minValue = std::numeric_limits<double>::max();
double maxValue = -minValue;
for ( RimSimWellInView* w : wells )
{
if ( !w->isWellDiskVisible( frameIndex ) ) continue;
bool isOk = true;
double value = w->calculateInjectionProductionFractions( wellDiskConfig, &isOk );
if ( isOk )