mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1853 Curve Creator. Plot tree view displays curves only
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#include "RimSummaryCase.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
#include "RimSummaryPlotCollection.h"
|
||||
#include "RimSummaryCurveCollection.h"
|
||||
|
||||
#include "RiuMainPlotWindow.h"
|
||||
|
||||
@@ -247,7 +248,7 @@ void RicSummaryCurveCreator::updateFromSummaryPlot(RimSummaryPlot* targetPlot)
|
||||
loadDataAndUpdatePlot();
|
||||
}
|
||||
|
||||
updateConnectedEditors();
|
||||
caf::PdmUiItem::updateConnectedEditors();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -912,8 +913,8 @@ void RicSummaryCurveCreator::updatePreviewCurvesFromCurveDefinitions(const std::
|
||||
}
|
||||
|
||||
m_previewPlot->loadDataAndUpdate();
|
||||
m_previewPlot->updateConnectedEditors();
|
||||
m_previewPlot->zoomAll();
|
||||
updateEditorsConnectedToPreviewPlot();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -1046,7 +1047,7 @@ void RicSummaryCurveCreator::populateCurveCreator(const RimSummaryPlot& sourceSu
|
||||
if (sourceCurveDefs.count(curveDef) == 0)
|
||||
curve->setCurveVisiblity(false);
|
||||
}
|
||||
m_previewPlot->updateConnectedEditors();
|
||||
updateEditorsConnectedToPreviewPlot();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -1156,3 +1157,9 @@ void RicSummaryCurveCreator::resetAllFields()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RicSummaryCurveCreator::updateEditorsConnectedToPreviewPlot()
|
||||
{
|
||||
m_previewPlot->updateConnectedEditors();
|
||||
m_previewPlot->summaryCurveCollection()->updateConnectedEditors();
|
||||
}
|
||||
|
||||
@@ -114,6 +114,7 @@ private:
|
||||
static void copyCurveAndAddToPlot(const RimSummaryCurve *curve, RimSummaryPlot *plot, bool forceVisible = false);
|
||||
|
||||
void resetAllFields();
|
||||
void updateEditorsConnectedToPreviewPlot();
|
||||
|
||||
private:
|
||||
caf::PdmPtrArrayField<RimSummaryCase*> m_selectedCases;
|
||||
|
||||
@@ -32,7 +32,8 @@
|
||||
#include <QSplitter>
|
||||
#include <QFrame>
|
||||
#include <QTreeView>
|
||||
|
||||
#include "RimSummaryPlot.h"
|
||||
#include "RimSummaryCurveCollection.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@@ -187,7 +188,8 @@ QWidget* RicSummaryCurveCreatorSplitterUi::getOrCreateCurveTreeWidget()
|
||||
RicSummaryCurveCreator* sumCurveCreator = dynamic_cast<RicSummaryCurveCreator*>(this->pdmItem());
|
||||
if (sumCurveCreator)
|
||||
{
|
||||
curveTreeView->setPdmItem(sumCurveCreator->previewPlot());
|
||||
RimSummaryCurveCollection* sumColl = sumCurveCreator->previewPlot()->summaryCurveCollection();
|
||||
curveTreeView->setPdmItem(sumColl);
|
||||
}
|
||||
|
||||
curveTreeView->treeView()->setHeaderHidden(true);
|
||||
|
||||
@@ -464,6 +464,14 @@ void RimSummaryPlot::deleteAllSummaryCurves()
|
||||
m_summaryCurveCollection->deleteAllCurves();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSummaryCurveCollection* RimSummaryPlot::summaryCurveCollection() const
|
||||
{
|
||||
return m_summaryCurveCollection();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -101,7 +101,7 @@ public:
|
||||
|
||||
std::vector<RimSummaryCurve*> summaryCurves() const;
|
||||
void deleteAllSummaryCurves();
|
||||
|
||||
RimSummaryCurveCollection* summaryCurveCollection() const;
|
||||
// RimViewWindow overrides
|
||||
public:
|
||||
virtual QWidget* createViewWidget(QWidget* mainWindowParent) override;
|
||||
|
||||
Reference in New Issue
Block a user