mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-10 07:26:03 -06:00
Summary plot crash fixes (#8595)
Disable assert for duplicated signal connections for now, just ignore everyone but the first one Temp. workaround for crash when duplicating plot axis properties. Update test
This commit is contained in:
parent
9826d94e9a
commit
0cd965dd5b
@ -2115,7 +2115,10 @@ void RimEnsembleCurveSet::initAfterRead()
|
||||
if ( m_plotAxisProperties.value() == nullptr )
|
||||
{
|
||||
RimSummaryPlot* plot = nullptr;
|
||||
firstAncestorOrThisOfTypeAsserted( plot );
|
||||
m_plotAxisProperties = plot->axisPropertiesForPlotAxis( RiuPlotAxis( m_plotAxis_OBSOLETE() ) );
|
||||
firstAncestorOrThisOfType( plot );
|
||||
if ( plot )
|
||||
{
|
||||
m_plotAxisProperties = plot->axisPropertiesForPlotAxis( RiuPlotAxis( m_plotAxis_OBSOLETE() ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -156,14 +156,14 @@ TEST( SignalTest, ObserverDeletion )
|
||||
emitter.triggerBasicSignal();
|
||||
}
|
||||
|
||||
TEST( SignalTest, ConnectSignalTwiceAssert )
|
||||
{
|
||||
ASSERT_DEATH(
|
||||
{
|
||||
TestEmitter emitter;
|
||||
TestObserver observer;
|
||||
|
||||
observer.connectSignalsTwice( &emitter );
|
||||
},
|
||||
"" );
|
||||
}
|
||||
// TEST( SignalTest, ConnectSignalTwiceAssert )
|
||||
//{
|
||||
// ASSERT_DEATH(
|
||||
// {
|
||||
// TestEmitter emitter;
|
||||
// TestObserver observer;
|
||||
//
|
||||
// observer.connectSignalsTwice( &emitter );
|
||||
// },
|
||||
// "" );
|
||||
//}
|
||||
|
@ -137,7 +137,8 @@ public:
|
||||
"Only classes that inherit SignalObserver can connect as an observer of a Signal." );
|
||||
|
||||
// Connecting a signal twice is not supported
|
||||
CAF_ASSERT( m_observerCallbacks.find( observer ) == m_observerCallbacks.end() );
|
||||
// CAF_ASSERT( m_observerCallbacks.find( observer ) == m_observerCallbacks.end() );
|
||||
if ( m_observerCallbacks.find( observer ) != m_observerCallbacks.end() ) return;
|
||||
|
||||
m_observerCallbacks[observer] = std::make_pair( callback, true );
|
||||
observer->addObservedSignal( this );
|
||||
|
Loading…
Reference in New Issue
Block a user