mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Make updating of well log plots more robust
1. Don't update tracks in RimWellLogPlot::createViewWidget. * We haven't set up the MDI windows properly yet. * Instead implement updateVIewWidgetAfterCreation override and do update tracks there. 2. Perform calculateAvailableDepthRange in applyZoomAllDepths 3. Do replot of track widgets twice when changing visible range. Need to investigate this one further.
This commit is contained in:
parent
ec63f0c28e
commit
fc821ea524
@ -220,6 +220,14 @@ QImage RimWellLogPlot::snapshotWindowContent()
|
||||
return image;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogPlot::updateViewWidgetAfterCreation()
|
||||
{
|
||||
recreateTrackPlots();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -702,6 +710,8 @@ void RimWellLogPlot::applyDepthZoomFromVisibleDepth()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogPlot::applyZoomAllDepths()
|
||||
{
|
||||
calculateAvailableDepthRange();
|
||||
|
||||
if (hasAvailableDepthRange())
|
||||
{
|
||||
setDepthZoomMinMax(m_minAvailableDepth, m_maxAvailableDepth + 0.01*(m_maxAvailableDepth - m_minAvailableDepth));
|
||||
@ -759,9 +769,6 @@ QString RimWellLogPlot::description() const
|
||||
QWidget* RimWellLogPlot::createViewWidget(QWidget* mainWindowParent)
|
||||
{
|
||||
m_viewer = new RiuWellLogPlot(this, mainWindowParent);
|
||||
|
||||
recreateTrackPlots();
|
||||
|
||||
return m_viewer;
|
||||
}
|
||||
|
||||
|
@ -126,7 +126,7 @@ protected:
|
||||
virtual void onLoadDataAndUpdate() override;
|
||||
|
||||
virtual QImage snapshotWindowContent() override;
|
||||
|
||||
virtual void updateViewWidgetAfterCreation() override;
|
||||
|
||||
private:
|
||||
void applyZoomAllDepths();
|
||||
|
@ -283,11 +283,12 @@ void RimWellLogTrack::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
||||
else if (changedField == &m_visibleXRangeMin || changedField == &m_visibleXRangeMax)
|
||||
{
|
||||
m_wellLogTrackPlotWidget->setXRange(m_visibleXRangeMin, m_visibleXRangeMax);
|
||||
m_wellLogTrackPlotWidget->replot();
|
||||
m_isAutoScaleXEnabled = false;
|
||||
updateEditors();
|
||||
updateParentPlotLayout();
|
||||
updateAxisAndGridTickIntervals();
|
||||
m_wellLogTrackPlotWidget->replot();
|
||||
m_wellLogTrackPlotWidget->replot(); // TODO: See if we can get rid of duplicate replot
|
||||
}
|
||||
else if (changedField == &m_isAutoScaleXEnabled)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user