Fix User Chart Axis Hover bug

.. turns out the jsonunprotect function wasn't stripping the trailing
   spaces that jsonprotect was adding. This caused axis labels to have
   spaces at the end that the qt charts code stripped-- so when we went
   looking for axis label texts they didn't match.

.. this commit causes jsonunprotect to strip trailing spaces. This
   should not result in any regression as use of jsonunprotect is
   limited to HomeWindow properties.
This commit is contained in:
Mark Liversedge
2020-03-08 21:49:17 +00:00
parent 20b00ea33b
commit 4fd07e7688

View File

@@ -217,6 +217,9 @@ QString jsonunprotect(const QString &string)
s.replace("\\f", "\f"); // formfeed
s.replace("\\/", "/"); // solidus
s.replace("\\\\", "\\"); // backslash
// those trailing spaces.
while (s.endsWith(" ")) s = s.mid(0,s.length()-1);
return s;
}