diff --git a/gnuplot-qlist-message.patch b/gnuplot-qlist-message.patch new file mode 100644 index 0000000..2242ca4 --- /dev/null +++ b/gnuplot-qlist-message.patch @@ -0,0 +1,27 @@ +--- a/src/qtterminal/QtGnuplotScene.cpp ++++ b/src/qtterminal/QtGnuplotScene.cpp +@@ -167,9 +167,7 @@ + void QtGnuplotScene::update_key_box(const QRectF rect) + { + if (m_currentPlotNumber > m_key_boxes.count()) { +- // DEBUG Feb 2018 should no longer trigger +- // because m_key_box insertion is done in layer code for GEAfterPlot +- m_key_boxes.insert(m_currentPlotNumber, QtGnuplotKeybox(rect)); ++ m_key_boxes.insert(m_currentPlotNumber-1, QtGnuplotKeybox(rect)); + } else if (m_key_boxes[m_currentPlotNumber-1].isEmpty()) { + // Retain the visible/hidden flag when re-initializing the Keybox + bool tmp = m_key_boxes[m_currentPlotNumber-1].ishidden(); +@@ -515,12 +513,12 @@ + if (0 < m_currentPlotNumber && m_currentPlotNumber <= m_key_boxes.count()) + newgroup->setVisible( !(m_key_boxes[m_currentPlotNumber-1].ishidden()) ); + // Store it in an ordered list so we can toggle it by index +- m_plot_group.insert(m_currentPlotNumber, newgroup); ++ m_plot_group.insert(m_currentPlotNumber-1, newgroup); + } + + if (m_currentPlotNumber >= m_key_boxes.count()) { + QRectF empty( QPointF(0,0), QPointF(0,0)); +- m_key_boxes.insert(m_currentPlotNumber, empty); ++ m_key_boxes.append(empty); + m_key_boxes[m_currentPlotNumber-1].resetStatus(); + } diff --git a/gnuplot.spec b/gnuplot.spec index 7411567..f33afd5 100644 --- a/gnuplot.spec +++ b/gnuplot.spec @@ -13,7 +13,7 @@ Summary: A program for plotting mathematical expressions and data Name: gnuplot Version: %{major}.%{minor}.%{patchlevel} -Release: 3%{?dist} +Release: 4%{?dist} # MIT .. term/PostScript/aglfn.txt License: gnuplot and MIT Group: Applications/Engineering @@ -34,6 +34,9 @@ Patch5: gnuplot-5.0.0-lua_checkint.patch Patch6: gnuplot-5.2.4-no-lena.patch Patch7: gnuplot-5.2.2-doc.patch patch8: gnuplot-5.2.4-cmd-opts.patch +# Suppress error messages "QList index out of range" +# Patch from upstream https://sourceforge.net/p/gnuplot/support-requests/269/ +Patch20: gnuplot-qlist-message.patch Requires: %{name}-common = %{version}-%{release} Requires: dejavu-sans-fonts @@ -173,6 +176,7 @@ plotting tool. %patch6 -p1 -b .nolena %patch7 -p1 -b .doc %patch8 -p1 -b .cmd-opts +%patch20 -p1 -b .qlist-index sed -i -e 's:"/usr/lib/X11/app-defaults":"%{x11_app_defaults_dir}":' src/gplt_x11.c iconv -f windows-1252 -t utf-8 ChangeLog > ChangeLog.aux mv ChangeLog.aux ChangeLog @@ -378,6 +382,9 @@ fi %{_datadir}/texlive/texmf-dist/tex/latex/gnuplot/ %changelog +* Wed May 27 2026 Pavel Cahyna - 5.2.4-4 +- Fix Qlist error message (Fedora bug #1970658) + * Wed Oct 5 2022 Pavel Cahyna - 5.2.4-3 - Rebuild with added gating configuration