mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-09 23:16:00 -06:00
#6360 Fix stacking issues
This commit is contained in:
parent
77ef87fb3a
commit
69f13b1015
@ -30,7 +30,7 @@ RimStackablePlotCurve::RimStackablePlotCurve()
|
||||
CAF_PDM_InitObject( "StackableCurve", ":/WellLogCurve16x16.png", "", "" );
|
||||
|
||||
CAF_PDM_InitField( &m_isStacked, "StackCurve", false, "Stack Curve", "", "", "" );
|
||||
CAF_PDM_InitField( &m_isStackedWithPhaseColors, "StackPhaseColors", false, " with Phase Colors", "", "", "" );
|
||||
CAF_PDM_InitField( &m_isStackedWithPhaseColors, "StackPhaseColors", true, " with Phase Colors", "", "", "" );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -56,6 +56,7 @@ void RimStackablePlotCurve::assignStackColor( size_t index, size_t count )
|
||||
this->setColor( color );
|
||||
this->setFillColor( color );
|
||||
}
|
||||
this->updateCurveAppearance();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -111,6 +112,11 @@ void RimStackablePlotCurve::fieldChangedByUi( const caf::PdmFieldHandle* changed
|
||||
{
|
||||
stackingColorsChanged.send( m_isStackedWithPhaseColors() );
|
||||
}
|
||||
else if ( changedField == &m_fillColor )
|
||||
{
|
||||
m_isStackedWithPhaseColors = false;
|
||||
this->updateConnectedEditors();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -285,10 +285,6 @@ RimWellLogTrack::RimWellLogTrack()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellLogTrack::~RimWellLogTrack()
|
||||
{
|
||||
for ( auto curve : m_curves )
|
||||
{
|
||||
disconnectCurveSignals( curve );
|
||||
}
|
||||
m_curves.deleteAllChildObjects();
|
||||
}
|
||||
|
||||
@ -774,18 +770,6 @@ void RimWellLogTrack::curveStackingChanged( const caf::SignalEmitter* emitter, b
|
||||
m_plotWidget->scheduleReplot();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogTrack::curveStackingColorsChanged( const caf::SignalEmitter* emitter, bool stackWithPhaseColors )
|
||||
{
|
||||
updateStackedCurveData();
|
||||
|
||||
m_isAutoScaleXEnabled = true;
|
||||
updateXZoom();
|
||||
m_plotWidget->scheduleReplot();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -2059,7 +2043,6 @@ void RimWellLogTrack::connectCurveSignals( RimWellLogCurve* curve )
|
||||
curve->visibilityChanged.connect( this, &RimWellLogTrack::curveVisibilityChanged );
|
||||
curve->appearanceChanged.connect( this, &RimWellLogTrack::curveAppearanceChanged );
|
||||
curve->stackingChanged.connect( this, &RimWellLogTrack::curveStackingChanged );
|
||||
curve->stackingColorsChanged.connect( this, &RimWellLogTrack::curveStackingColorsChanged );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -2071,7 +2054,6 @@ void RimWellLogTrack::disconnectCurveSignals( RimWellLogCurve* curve )
|
||||
curve->visibilityChanged.disconnect( this );
|
||||
curve->appearanceChanged.disconnect( this );
|
||||
curve->stackingChanged.disconnect( this );
|
||||
curve->stackingColorsChanged.disconnect( this );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -254,7 +254,6 @@ private:
|
||||
void curveVisibilityChanged( const caf::SignalEmitter* emitter, bool visible );
|
||||
void curveAppearanceChanged( const caf::SignalEmitter* emitter );
|
||||
void curveStackingChanged( const caf::SignalEmitter* emitter, bool stacked );
|
||||
void curveStackingColorsChanged( const caf::SignalEmitter* emitter, bool stackWithPhaseColors );
|
||||
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
bool* useOptionsOnly ) override;
|
||||
|
@ -510,7 +510,7 @@ void RimSummaryCurve::updateZoomInParentPlot()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
{
|
||||
this->RimPlotCurve::updateCurvePresentation( updateParentPlot );
|
||||
RimPlotCurve::updateCurvePresentation( updateParentPlot );
|
||||
|
||||
m_yValuesSummaryAddressUiField = m_yValuesSummaryAddress->address();
|
||||
m_xValuesSummaryAddressUiField = m_xValuesSummaryAddress->address();
|
||||
@ -931,7 +931,7 @@ void RimSummaryCurve::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue )
|
||||
{
|
||||
this->RimPlotCurve::fieldChangedByUi( changedField, oldValue, newValue );
|
||||
RimStackablePlotCurve::fieldChangedByUi( changedField, oldValue, newValue );
|
||||
|
||||
RimSummaryPlot* plot = nullptr;
|
||||
firstAncestorOrThisOfType( plot );
|
||||
@ -965,16 +965,16 @@ void RimSummaryCurve::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||
mainPlotWindow->updateSummaryPlotToolBar();
|
||||
|
||||
if ( m_showCurve() == true )
|
||||
{
|
||||
plot->summaryCurveCollection()->setCurveAsTopZWithinCategory( this );
|
||||
}
|
||||
// If no plot collection is found, we assume that we are inside a curve creator
|
||||
// Update the summary curve collection to make sure the curve names are updated in curve creator UI
|
||||
visibilityChanged.send( m_showCurve() );
|
||||
}
|
||||
else if ( changedField == &m_plotAxis )
|
||||
{
|
||||
updateQwtPlotAxis();
|
||||
|
||||
plot->updateAxes();
|
||||
dataChanged.send();
|
||||
}
|
||||
else if ( changedField == &m_yValuesSummaryCase )
|
||||
{
|
||||
@ -986,7 +986,10 @@ void RimSummaryCurve::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
setSymbol( RiuQwtSymbol::SYMBOL_XCROSS );
|
||||
}
|
||||
plot->updateCaseNameHasChanged();
|
||||
|
||||
// TODO: is it not ok to just set loadAndUpdate = true?
|
||||
this->onLoadDataAndUpdate( true );
|
||||
dataChanged.send();
|
||||
}
|
||||
else if ( changedField == &m_yPushButtonSelectSummaryAddress )
|
||||
{
|
||||
@ -1122,24 +1125,8 @@ void RimSummaryCurve::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
|
||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||
mainPlotWindow->updateSummaryPlotToolBar();
|
||||
}
|
||||
|
||||
if ( &m_showCurve == changedField )
|
||||
{
|
||||
// If no plot collection is found, we assume that we are inside a curve creator
|
||||
// Update the summary curve collection to make sure the curve names are updated in curve creator UI
|
||||
|
||||
RimSummaryPlotCollection* plotCollection = nullptr;
|
||||
this->firstAncestorOrThisOfType( plotCollection );
|
||||
if ( !plotCollection )
|
||||
{
|
||||
RimSummaryCurveCollection* curveColl = nullptr;
|
||||
this->firstAncestorOrThisOfType( curveColl );
|
||||
if ( curveColl )
|
||||
{
|
||||
curveColl->updateConnectedEditors();
|
||||
}
|
||||
}
|
||||
dataChanged.send();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ CAF_PDM_SOURCE_INIT( RimSummaryCurveCollection, "RimSummaryCurveCollection" );
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSummaryCurveCollection::RimSummaryCurveCollection()
|
||||
: curvesAddedOrRemoved( this )
|
||||
: curvesReordered( this )
|
||||
{
|
||||
CAF_PDM_InitObject( "Summary Curves", ":/SummaryCurveFilter16x16.png", "", "" );
|
||||
|
||||
@ -431,58 +431,6 @@ RimSummaryPlotSourceStepping*
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryCurveCollection::moveCurvesToCollection( RimSummaryCurveCollection* collection,
|
||||
const std::vector<RimSummaryCurve*> curves,
|
||||
RimSummaryCurve* curveToInsertBeforeOrAfter,
|
||||
int insertAtPosition,
|
||||
bool isSwapOperation )
|
||||
{
|
||||
CAF_ASSERT( collection );
|
||||
|
||||
std::set<RimSummaryCurveCollection*> srcCollections;
|
||||
|
||||
for ( auto curve : curves )
|
||||
{
|
||||
RimSummaryCurveCollection* srcCollection = nullptr;
|
||||
|
||||
if ( curve == curveToInsertBeforeOrAfter ) continue;
|
||||
|
||||
curve->firstAncestorOrThisOfTypeAsserted( srcCollection );
|
||||
|
||||
srcCollection->removeCurve( curve );
|
||||
srcCollections.insert( srcCollection );
|
||||
}
|
||||
|
||||
for ( auto collection : srcCollections )
|
||||
{
|
||||
collection->updateConnectedEditors();
|
||||
collection->curvesAddedOrRemoved.send();
|
||||
}
|
||||
|
||||
if ( insertAtPosition == -1 )
|
||||
{
|
||||
if ( curveToInsertBeforeOrAfter )
|
||||
{
|
||||
insertAtPosition = (int)collection->m_curves.index( curveToInsertBeforeOrAfter );
|
||||
if ( !isSwapOperation ) insertAtPosition += 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
insertAtPosition = (int)collection->m_curves.size();
|
||||
}
|
||||
}
|
||||
for ( size_t cIdx = 0; cIdx < curves.size(); ++cIdx )
|
||||
{
|
||||
collection->insertCurve( curves[cIdx], (size_t)insertAtPosition + cIdx );
|
||||
}
|
||||
|
||||
collection->updateConnectedEditors();
|
||||
collection->curvesAddedOrRemoved.send();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -528,7 +476,7 @@ void RimSummaryCurveCollection::defineEditorAttribute( const caf::PdmFieldHandle
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryCurveCollection::onCurvesReordered( const SignalEmitter* emitter )
|
||||
{
|
||||
curvesAddedOrRemoved.send();
|
||||
curvesReordered.send();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -30,6 +30,8 @@ class QwtPlot;
|
||||
class QwtPlotCurve;
|
||||
class RimSummaryCase;
|
||||
class RimSummaryCurve;
|
||||
class RimSummaryCrossPlot;
|
||||
class RimSummaryPlot;
|
||||
class QKeyEvent;
|
||||
|
||||
//==================================================================================================
|
||||
@ -39,8 +41,8 @@ class RimSummaryCurveCollection : public caf::PdmObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
public:
|
||||
caf::Signal<> curvesAddedOrRemoved;
|
||||
private:
|
||||
caf::Signal<> curvesReordered;
|
||||
|
||||
public:
|
||||
RimSummaryCurveCollection();
|
||||
@ -48,7 +50,21 @@ public:
|
||||
|
||||
bool isCurvesVisible();
|
||||
|
||||
void setCurveForSourceStepping( RimSummaryCurve* curve );
|
||||
RimSummaryCurve* curveForSourceStepping() const;
|
||||
|
||||
RimSummaryPlotSourceStepping*
|
||||
sourceSteppingObject( RimSummaryPlotSourceStepping::SourceSteppingType sourceSteppingType ) const;
|
||||
|
||||
std::vector<RimSummaryCurve*> curves() const;
|
||||
std::vector<RimSummaryCurve*>
|
||||
curvesForSourceStepping( RimSummaryPlotSourceStepping::SourceSteppingType steppingType ) const;
|
||||
|
||||
void setCurveAsTopZWithinCategory( RimSummaryCurve* curve );
|
||||
|
||||
void loadDataAndUpdate( bool updateParentPlot );
|
||||
|
||||
private:
|
||||
void setParentQwtPlotAndReplot( QwtPlot* plot );
|
||||
void detachQwtCurves();
|
||||
void reattachQwtCurves();
|
||||
@ -60,10 +76,6 @@ public:
|
||||
void deleteCurve( RimSummaryCurve* curve );
|
||||
void removeCurve( RimSummaryCurve* curve );
|
||||
|
||||
std::vector<RimSummaryCurve*> curves() const;
|
||||
std::vector<RimSummaryCurve*>
|
||||
curvesForSourceStepping( RimSummaryPlotSourceStepping::SourceSteppingType steppingType ) const;
|
||||
|
||||
void deleteCurvesAssosiatedWithCase( RimSummaryCase* summaryCase );
|
||||
void deleteAllCurves();
|
||||
void updateCaseNameHasChanged();
|
||||
@ -72,20 +84,6 @@ public:
|
||||
|
||||
std::vector<caf::PdmFieldHandle*> fieldsToShowInToolbar();
|
||||
|
||||
void setCurveAsTopZWithinCategory( RimSummaryCurve* curve );
|
||||
|
||||
void setCurveForSourceStepping( RimSummaryCurve* curve );
|
||||
RimSummaryCurve* curveForSourceStepping() const;
|
||||
|
||||
RimSummaryPlotSourceStepping*
|
||||
sourceSteppingObject( RimSummaryPlotSourceStepping::SourceSteppingType sourceSteppingType ) const;
|
||||
|
||||
static void moveCurvesToCollection( RimSummaryCurveCollection* collection,
|
||||
const std::vector<RimSummaryCurve*> curves,
|
||||
RimSummaryCurve* curveToInsertBeforeOrAfter,
|
||||
int insertAtPosition,
|
||||
bool isSwapOperation );
|
||||
|
||||
private:
|
||||
caf::PdmFieldHandle* objectToggleField() override;
|
||||
void defineObjectEditorAttribute( QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
||||
@ -101,6 +99,9 @@ private:
|
||||
void onCurvesReordered( const SignalEmitter* emitter );
|
||||
|
||||
private:
|
||||
friend class RimSummaryCrossPlot;
|
||||
friend class RimSummaryPlot;
|
||||
|
||||
caf::PdmField<bool> m_showCurves;
|
||||
caf::PdmChildArrayField<RimSummaryCurve*> m_curves;
|
||||
caf::PdmField<bool> m_editPlot;
|
||||
|
@ -158,7 +158,7 @@ RimSummaryPlot::RimSummaryPlot()
|
||||
CAF_PDM_InitFieldNoDefault( &m_summaryCurveCollection, "SummaryCurveCollection", "", "", "", "" );
|
||||
m_summaryCurveCollection.uiCapability()->setUiTreeHidden( true );
|
||||
m_summaryCurveCollection = new RimSummaryCurveCollection;
|
||||
m_summaryCurveCollection->curvesAddedOrRemoved.connect( this, &RimSummaryPlot::onCurvesAddedOrRemoved );
|
||||
m_summaryCurveCollection->curvesReordered.connect( this, &RimSummaryPlot::onCurvesReordered );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_ensembleCurveSetCollection, "EnsembleCurveSetCollection", "", "", "", "" );
|
||||
m_ensembleCurveSetCollection.uiCapability()->setUiTreeHidden( true );
|
||||
@ -468,6 +468,47 @@ void RimSummaryPlot::onAxisSelected( int axis, bool toggle )
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryPlot::moveCurvesToPlot( RimSummaryPlot* plot, const std::vector<RimSummaryCurve*> curves, int insertAtPosition )
|
||||
{
|
||||
CAF_ASSERT( plot );
|
||||
|
||||
std::set<RimSummaryPlot*> srcPlots;
|
||||
|
||||
for ( auto curve : curves )
|
||||
{
|
||||
RimSummaryPlot* srcPlot = nullptr;
|
||||
|
||||
curve->firstAncestorOrThisOfTypeAsserted( srcPlot );
|
||||
|
||||
srcPlot->removeCurve( curve );
|
||||
srcPlots.insert( srcPlot );
|
||||
}
|
||||
|
||||
for ( auto srcPlot : srcPlots )
|
||||
{
|
||||
srcPlot->updateConnectedEditors();
|
||||
srcPlot->loadDataAndUpdate();
|
||||
}
|
||||
for ( size_t cIdx = 0; cIdx < curves.size(); ++cIdx )
|
||||
{
|
||||
if ( insertAtPosition >= 0 )
|
||||
{
|
||||
size_t position = (size_t)insertAtPosition + cIdx;
|
||||
plot->insertCurve( curves[cIdx], position );
|
||||
}
|
||||
else
|
||||
{
|
||||
plot->addCurveNoUpdate( curves[cIdx] );
|
||||
}
|
||||
}
|
||||
|
||||
plot->updateConnectedEditors();
|
||||
plot->updateStackedCurveData();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -1184,6 +1225,30 @@ void RimSummaryPlot::addCurveNoUpdate( RimSummaryCurve* curve )
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryPlot::insertCurve( RimSummaryCurve* curve, size_t insertAtPosition )
|
||||
{
|
||||
if ( curve )
|
||||
{
|
||||
m_summaryCurveCollection->insertCurve( curve, insertAtPosition );
|
||||
connectCurveSignals( curve );
|
||||
if ( m_plotWidget )
|
||||
{
|
||||
curve->setParentQwtPlotNoReplot( m_plotWidget );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryPlot::removeCurve( RimSummaryCurve* curve )
|
||||
{
|
||||
m_summaryCurveCollection->removeCurve( curve );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -1364,8 +1429,6 @@ void RimSummaryPlot::childFieldChangedByUi( const caf::PdmFieldHandle* changedCh
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryPlot::updateStackedCurveData()
|
||||
{
|
||||
loadDataAndUpdate();
|
||||
|
||||
updateStackedCurveDataForAxis( RiaDefines::PlotAxis::PLOT_AXIS_LEFT );
|
||||
updateStackedCurveDataForAxis( RiaDefines::PlotAxis::PLOT_AXIS_RIGHT );
|
||||
}
|
||||
@ -1523,6 +1586,8 @@ void RimSummaryPlot::onLoadDataAndUpdate()
|
||||
this->updateAxes();
|
||||
|
||||
m_textCurveSetEditor->updateTextFilter();
|
||||
|
||||
updateStackedCurveData();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -1589,10 +1654,6 @@ std::set<RimPlotAxisPropertiesInterface*> RimSummaryPlot::allPlotAxes() const
|
||||
void RimSummaryPlot::cleanupBeforeClose()
|
||||
{
|
||||
detachAllPlotItems();
|
||||
for ( auto curve : summaryCurves() )
|
||||
{
|
||||
disconnectCurveSignals( curve );
|
||||
}
|
||||
|
||||
if ( m_plotWidget )
|
||||
{
|
||||
@ -1631,7 +1692,7 @@ void RimSummaryPlot::disconnectCurveSignals( RimSummaryCurve* curve )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryPlot::curveDataChanged( const caf::SignalEmitter* emitter )
|
||||
{
|
||||
updateStackedCurveData();
|
||||
loadDataAndUpdate();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -1639,7 +1700,7 @@ void RimSummaryPlot::curveDataChanged( const caf::SignalEmitter* emitter )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryPlot::curveVisibilityChanged( const caf::SignalEmitter* emitter, bool visible )
|
||||
{
|
||||
updateStackedCurveData();
|
||||
loadDataAndUpdate();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -1658,7 +1719,7 @@ void RimSummaryPlot::curveAppearanceChanged( const caf::SignalEmitter* emitter )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryPlot::curveStackingChanged( const caf::SignalEmitter* emitter, bool stacked )
|
||||
{
|
||||
updateStackedCurveData();
|
||||
loadDataAndUpdate();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -1666,7 +1727,7 @@ void RimSummaryPlot::curveStackingChanged( const caf::SignalEmitter* emitter, bo
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryPlot::curveStackingColorsChanged( const caf::SignalEmitter* emitter, bool stackWithPhaseColors )
|
||||
{
|
||||
updateStackedCurveData();
|
||||
loadDataAndUpdate();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -2107,11 +2168,9 @@ void RimSummaryPlot::handleKeyPressEvent( QKeyEvent* keyEvent )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryPlot::onCurvesAddedOrRemoved( const SignalEmitter* emitter )
|
||||
void RimSummaryPlot::onCurvesReordered( const SignalEmitter* emitter )
|
||||
{
|
||||
loadDataAndUpdate();
|
||||
updateStackedCurveData();
|
||||
reattachAllCurves();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -84,6 +84,10 @@ public:
|
||||
void addCurveAndUpdate( RimSummaryCurve* curve );
|
||||
void addCurveNoUpdate( RimSummaryCurve* curve );
|
||||
|
||||
void insertCurve( RimSummaryCurve* curve, size_t insertAtPosition );
|
||||
|
||||
void removeCurve( RimSummaryCurve* curve );
|
||||
|
||||
void deleteCurve( RimSummaryCurve* curve );
|
||||
void deleteCurves( const std::vector<RimSummaryCurve*>& curves );
|
||||
|
||||
@ -170,6 +174,8 @@ public:
|
||||
return 8;
|
||||
}
|
||||
|
||||
static void moveCurvesToPlot( RimSummaryPlot* plot, const std::vector<RimSummaryCurve*> curves, int insertAtPosition );
|
||||
|
||||
public:
|
||||
// RimViewWindow overrides
|
||||
void deleteViewWidget() override;
|
||||
@ -189,7 +195,7 @@ private:
|
||||
void doRemoveFromCollection() override;
|
||||
void handleKeyPressEvent( QKeyEvent* keyEvent ) override;
|
||||
|
||||
void onCurvesAddedOrRemoved( const SignalEmitter* emitter );
|
||||
void onCurvesReordered( const SignalEmitter* emitter );
|
||||
|
||||
protected:
|
||||
// Overridden PDM methods
|
||||
|
@ -575,11 +575,7 @@ bool RiuDragDrop::handleSummaryPlotDrop( Qt::DropAction action,
|
||||
{
|
||||
if ( action == Qt::MoveAction )
|
||||
{
|
||||
RimSummaryCurveCollection::moveCurvesToCollection( summaryPlot->summaryCurveCollection(),
|
||||
summaryCurves,
|
||||
nullptr,
|
||||
insertAtPosition,
|
||||
false );
|
||||
RimSummaryPlot::moveCurvesToPlot( summaryPlot, summaryCurves, insertAtPosition );
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -179,6 +179,9 @@ public:
|
||||
observer->beingDeleted.connect( this );
|
||||
}
|
||||
|
||||
// Disconnect an observer from the signal. Do this only when the relationship between the
|
||||
// observer and emitter is severed but the object kept alive.
|
||||
// There's no need to do this when deleting the observer.
|
||||
void disconnect( SignalObserver* observer )
|
||||
{
|
||||
m_observerCallbacks.erase( observer );
|
||||
|
Loading…
Reference in New Issue
Block a user