From 360024c4bc371c8e645837b5429e9c2892483a06 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Fri, 11 Oct 2024 14:28:56 +0200 Subject: [PATCH] Make sure the insertWidget function inserts at the correct index Insert the first widget at index 1 causes crash in Qt6 --- .../SummaryPlotCommands/RicSummaryPlotEditorWidgetCreator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryPlotEditorWidgetCreator.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryPlotEditorWidgetCreator.cpp index 602c66c27b..fc46dd7cf4 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryPlotEditorWidgetCreator.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryPlotEditorWidgetCreator.cpp @@ -114,7 +114,7 @@ void RicSummaryPlotEditorWidgetCreator::recursivelyConfigureAndUpdateTopLevelUiO QMinimizePanel* curveGroup = getOrCreateCurveTreeGroup(); m_lowerLeftLayout->insertWidget( 2, curveGroup, 1 ); m_lowerLeftLayout->addStretch( 0 ); - m_lowerRightLayout->insertWidget( 1, getOrCreatePlotWidget() ); + m_lowerRightLayout->insertWidget( 0, getOrCreatePlotWidget() ); // Fields at bottom of dialog configureAndUpdateFields( 1, m_bottomFieldLayout, topLevelUiItems, uiConfigName );