Fix Qlist error message #1970658 .

This commit is contained in:
Vasiliy Glazov 2021-08-05 20:37:09 +03:00
parent 5cda090b14
commit 31a8cb2f1b
2 changed files with 35 additions and 1 deletions

View File

@ -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();
}

View File

@ -19,7 +19,7 @@
Summary: A program for plotting mathematical expressions and data
Name: gnuplot
Version: %{major}.%{minor}.%{patchlevel}
Release: 10%{?dist}
Release: 11%{?dist}
# MIT .. term/PostScript/aglfn.txt
License: gnuplot and MIT
URL: http://www.gnuplot.info/
@ -40,6 +40,9 @@ Patch6: gnuplot-5.2.4-no-lena.patch
Patch7: gnuplot-5.2.2-doc.patch
Patch8: gnuplot-5.2.8-cmd-opts.patch
Patch9: gnuplot-config.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
@ -177,6 +180,7 @@ plotting tool.
%patch7 -p1 -b .doc
%patch8 -p1 -b .cmd-opts
%patch9 -p1 -b .config
%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
@ -369,6 +373,9 @@ fi
%{_datadir}/texlive/texmf-dist/tex/latex/gnuplot/
%changelog
* Thu Aug 05 2021 Vasiliy N. Glazov <vascom2@gmail.com> - 5.2.8-11
- Fix Qlist error message #1970658
* Thu Jul 22 2021 Scott Talbert <swt@techie.net> - 5.2.8-10
- Fix FTBFS due to dropped texlive package