Hello community,

here is the log from the commit of package python-veusz for openSUSE:Factory 
checked in at 2014-09-03 18:23:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-veusz (Old)
 and      /work/SRC/openSUSE:Factory/.python-veusz.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-veusz"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-veusz/python-veusz.changes        
2014-05-09 06:59:08.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-veusz.new/python-veusz.changes   
2014-09-03 20:57:47.000000000 +0200
@@ -1,0 +2,21 @@
+Sat Aug 30 21:58:22 UTC 2014 - badshah...@gmail.com
+
+- Update to version 1.21.1:
+  + Add swap option on keys, swapping symbol and text
+  + Bug fixes:
+    - Fix missing labels if colorbar out of plot
+    - Preserve tags when reloading datasets
+    - Handle nan/inf/-inf when as value in UI
+    - Remove dependence on pyqtconfig in build system
+    - Handle errors properly in 2D CSV read
+    - Do not crash if selecting siblings of document widget
+    - Fix accidental modification of data by line widget
+    - Improve PDF bounding box rounding to prevent chopping near
+      edge
+    - Fix function plotter in embedding
+    - Fix astropy version checking
+    - Fix crash for error bar in CSV with blank previous column 
+- Drop python-veusz-test-disable-contour_labels.patch; patch
+  incorporated upstream.
+ 
+-------------------------------------------------------------------

Old:
----
  python-veusz-test-disable-contour_labels.patch
  veusz-1.21.tar.gz

New:
----
  veusz-1.21.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-veusz.spec ++++++
--- /var/tmp/diff_new_pack.NIGG5X/_old  2014-09-03 20:57:48.000000000 +0200
+++ /var/tmp/diff_new_pack.NIGG5X/_new  2014-09-03 20:57:48.000000000 +0200
@@ -19,7 +19,7 @@
 %define pyname veusz
 
 Name:           python-veusz
-Version:        1.21
+Version:        1.21.1
 Release:        0
 # The entire source code is GPL-2.0+ except helpers/src/_nc_cntr.c which is 
Python-2.0
 Summary:        GUI scientific plotting package
@@ -28,8 +28,6 @@
 Url:            http://home.gna.org/veusz/
 Source0:        http://download.gna.org/veusz/veusz-%{version}.tar.gz
 Source3:        %{pyname}_256.png
-# PATCH-FIX-UPSTREAM python-veusz-test-disable-contour_labels.patch 
badshah...@gmail.com -- Disable an erroneous test that causes build failures, 
patch came from upstream
-Patch0:         python-veusz-test-disable-contour_labels.patch
 BuildRequires:  desktop-file-utils
 BuildRequires:  fdupes
 BuildRequires:  hicolor-icon-theme
@@ -61,7 +59,6 @@
 
 %prep
 %setup -q -n %{pyname}-%{version}
-%patch0 -p1
 find -name \*~ | xargs rm -f
 
 %build

++++++ veusz-1.21.tar.gz -> veusz-1.21.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/veusz-1.21/ChangeLog new/veusz-1.21.1/ChangeLog
--- old/veusz-1.21/ChangeLog    2014-05-03 10:14:11.000000000 +0200
+++ new/veusz-1.21.1/ChangeLog  2014-08-30 14:17:35.000000000 +0200
@@ -1,3 +1,19 @@
+Changes in 1.21.1
+ * Add swap option on keys, swapping symbol and text
+
+Bug fixes
+ * Fix missing labels if colorbar out of plot
+ * Preserve tags when reloading datasets
+ * Handle nan/inf/-inf when as value in UI
+ * Remove dependence on pyqtconfig in build system
+ * Handle errors properly in 2D CSV read
+ * Do not crash if selecting siblings of document widget
+ * Fix accidental modification of data by line widget
+ * Improve PDF bounding box rounding to prevent chopping near edge
+ * Fix function plotter in embedding
+ * Fix astropy version checking
+ * Fix crash for error bar in CSV with blank previous column
+
 Changes in 1.21:
  * Add HDF5 saved document format
  * Add filled curve error bar style
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/veusz-1.21/PKG-INFO new/veusz-1.21.1/PKG-INFO
--- old/veusz-1.21/PKG-INFO     2014-05-03 10:53:27.000000000 +0200
+++ new/veusz-1.21.1/PKG-INFO   2014-08-23 17:16:03.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: veusz
-Version: 1.21
+Version: 1.21.1
 Summary: A scientific plotting package
 Home-page: http://home.gna.org/veusz/
 Author: Jeremy Sanders
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/veusz-1.21/README new/veusz-1.21.1/README
--- old/veusz-1.21/README       2014-05-03 10:14:11.000000000 +0200
+++ new/veusz-1.21.1/README     2014-08-23 17:15:18.000000000 +0200
@@ -1,5 +1,5 @@
-Veusz 1.21
-----------
+Veusz 1.21.1
+------------
 http://home.gna.org/veusz/
 
 Veusz is a scientific plotting package.  It is designed to produce
@@ -12,39 +12,21 @@
 manipulation and editing of datasets. Data can be captured from
 external sources such as Internet sockets or other programs.
 
-Changes in 1.21:
- * Add HDF5 saved document format
- * Add filled curve error bar style
- * Add fill left/right options for point plotter
- * Add filetype filters to import dialog file browser dialog
- * In file completer in import dialog, use selected tab as filter
- * Move code to use PyQt new style signals
- * Add a master color setting for xy point and nonorthpoint plot
- * Line labelling algorithm much improved in contour plots, which
-   rotates text to match line angle and avoids label overlaps
- * More accurate axis tick label bounding boxes, allowing rotated
-   labels to be placed close together
- * Add reflection and rotation options to vector field widget
- * Switch to scientific notation earlier when showing float settings
+Changes in 1.21.1
+ * Add swap option on keys, swapping symbol and text
 
-Bug fixes:
- * Direction combo did not work in import dialog
- * Saving text datasets did not work in Python3
- * Fix partial dataset evaluation issue when loading documents
- * 2D non-regular pixel spaced images give error if clipped in y
- * Handle Unicode quoted characters in simple text data files
- * xcent/ycent in Dataset2D import plugins were ignored
- * promote_tab broken for import plugins
- * Full screen view when all pages are deleted
- * Crash with empty dataset and boxplot widget
- * Fix copy and paste of datasets
- * Python 3 resizing axis bug
- * Crash if picking/zooming on document with no pages
- * Crash if reediting histogram dataset with blank output entry
- * Use end of text formatting string beyond format specifier
- * When writing SVG text as text, use xml:space="preserve" to
-   avoid missing whitespace
- * Embedding socket issue on Python 3.4+
+Bug fixes
+ * Fix missing labels if colorbar out of plot
+ * Preserve tags when reloading datasets
+ * Handle nan/inf/-inf when as value in UI
+ * Remove dependence on pyqtconfig in build system
+ * Handle errors properly in 2D CSV read
+ * Do not crash if selecting siblings of document widget
+ * Fix accidental modification of data by line widget
+ * Improve PDF bounding box rounding to prevent chopping near edge
+ * Fix function plotter in embedding
+ * Fix astropy version checking
+ * Fix crash for error bar in CSV with blank previous column
 
 Features of package:
  Plotting features:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/veusz-1.21/VERSION new/veusz-1.21.1/VERSION
--- old/veusz-1.21/VERSION      2014-05-03 10:15:32.000000000 +0200
+++ new/veusz-1.21.1/VERSION    2014-08-23 17:15:18.000000000 +0200
@@ -1 +1 @@
-1.21
+1.21.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/veusz-1.21/pyqtdistutils.py 
new/veusz-1.21.1/pyqtdistutils.py
--- old/veusz-1.21/pyqtdistutils.py     2013-11-09 11:23:50.000000000 +0100
+++ new/veusz-1.21.1/pyqtdistutils.py   2014-08-23 17:15:18.000000000 +0200
@@ -10,7 +10,37 @@
 import os
 import sys
 
-import PyQt4.pyqtconfig
+import sip
+sip.setapi('QString', 2)
+
+import sipconfig
+import PyQt4.QtCore
+
+##################################################################
+# try to get various useful things we need in order to build
+# this is likely to break, I'm sure
+
+QT_LIB_DIR = PyQt4.QtCore.QLibraryInfo.location(
+    PyQt4.QtCore.QLibraryInfo.LibrariesPath)
+QT_INC_DIR = PyQt4.QtCore.QLibraryInfo.location(
+    PyQt4.QtCore.QLibraryInfo.HeadersPath)
+QT_IS_FRAMEWORK = os.path.exists(
+    os.path.join(QT_LIB_DIR, 'QtCore.framework') )
+
+try:
+    # >= 4.10
+    SIP_FLAGS = PyQt4.QtCore.PYQT_CONFIGURATION['sip_flags']
+except:
+    import PyQt4.pyqtconfig
+    SIP_FLAGS = PyQt4.pyqtconfig.Configuration().pyqt_sip_flags
+
+PYQT_SIP_DIR = os.path.join(
+    sipconfig.Configuration().default_sip_dir, 'PyQt4')
+
+SIP_BIN = sipconfig.Configuration().sip_bin
+SIP_INC_DIR = sipconfig.Configuration().sip_inc_dir
+
+##################################################################
 
 def replace_suffix(path, new_suffix):
     return os.path.splitext(path)[0] + new_suffix
@@ -35,43 +65,34 @@
 
         raise RuntimeError('cannot parse SIP-generated "%s"' % sbf)
 
-    def _find_sip(self):
-        cfg = PyQt4.pyqtconfig.Configuration()
-        return cfg.sip_bin
-
-    def _sip_inc_dir(self):
-        cfg = PyQt4.pyqtconfig.Configuration()
-        return cfg.sip_inc_dir
+    def get_includes(self):
 
-    def get_includes(self, cfg):
         incdirs = []
         for mod in ('QtCore', 'QtGui', 'QtXml'):
-            if cfg.qt_framework:
-                incdirs.append( os.path.join(cfg.qt_lib_dir,
-                                             mod + '.framework', 'Headers') )
+            if QT_IS_FRAMEWORK:
+                incdirs.append(
+                    os.path.join(QT_LIB_DIR, mod + '.framework', 'Headers') )
             else:
-                incdirs.append( os.path.join(cfg.qt_inc_dir, mod) )
+                incdirs.append( os.path.join(QT_INC_DIR, mod) )
         return incdirs
 
     def swig_sources (self, sources, extension=None):
         if not self.extensions:
             return
 
-        cfg = PyQt4.pyqtconfig.Configuration()
-
         # add directory of input files as include path
         indirs = list(set([os.path.dirname(x) for x in sources]))
 
         # Add the SIP and Qt include directories to the include path
         extension.include_dirs += [
-            cfg.sip_inc_dir,
-            cfg.qt_inc_dir,
-            ] + self.get_includes(cfg) + indirs
+            SIP_INC_DIR,
+            QT_INC_DIR,
+            ] + self.get_includes() + indirs
 
         # link against libraries
-        if cfg.qt_framework:
+        if QT_IS_FRAMEWORK:
             extension.extra_link_args = [
-                '-F', os.path.join(cfg.qt_lib_dir),
+                '-F', os.path.join(QT_LIB_DIR),
                 '-framework', 'QtGui',
                 '-framework', 'QtCore',
                 '-framework', 'QtXml'
@@ -80,7 +101,7 @@
             extension.libraries = ['QtGui4', 'QtCore4', 'QtXml4']
         else:
             extension.libraries = ['QtGui', 'QtCore', 'QtXml']
-        extension.library_dirs = [cfg.qt_lib_dir]
+        extension.library_dirs = [QT_LIB_DIR]
 
         depends = extension.depends
 
@@ -101,25 +122,22 @@
                          if not source.endswith('.sip')]
         generated_sources = []
 
-        sip_bin = self._find_sip()
-
         for sip in sip_sources:
             # Use the sbf file as dependency check
             sipbasename = os.path.basename(sip)
             sbf = os.path.join(self.build_temp,
                                replace_suffix(sipbasename, '.sbf'))
             if newer_group([sip]+depends, sbf) or self.force:
-                self._sip_compile(sip_bin, sip, sbf)
+                self._sip_compile(sip, sbf)
             out = self._get_sip_output_list(sbf)
             generated_sources.extend(out)
 
         return generated_sources + other_sources
 
-    def _sip_compile(self, sip_bin, source, sbf):
-        cfg = PyQt4.pyqtconfig.Configuration()
-        self.spawn([sip_bin,
+    def _sip_compile(self, source, sbf):
+        self.spawn([SIP_BIN,
                     '-c', self.build_temp,
-                    ] + cfg.pyqt_sip_flags.split() + [
-                    '-I', cfg.pyqt_sip_dir,
+                    ] + SIP_FLAGS.split() + [
+                    '-I', PYQT_SIP_DIR,
                     '-b', sbf,
                     source])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/veusz-1.21/support/veusz.desktop 
new/veusz-1.21.1/support/veusz.desktop
--- old/veusz-1.21/support/veusz.desktop        2014-02-01 18:09:03.000000000 
+0100
+++ new/veusz-1.21.1/support/veusz.desktop      2014-08-23 17:15:18.000000000 
+0200
@@ -3,9 +3,9 @@
 Name=Veusz
 GenericName=Scientific plotting
 Comment=Scientific plotting and graphing package
-MimeType=application/x-veusz
+MimeType=application/x-veusz;
 Exec=veusz %F
 Icon=veusz
 Terminal=false
 Type=Application
-Categories=Graphics;
+Categories=DataVisualization;Science;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/veusz-1.21/tests/runselftest.py 
new/veusz-1.21.1/tests/runselftest.py
--- old/veusz-1.21/tests/runselftest.py 2014-04-27 15:02:31.000000000 +0200
+++ new/veusz-1.21.1/tests/runselftest.py       2014-06-11 19:42:38.000000000 
+0200
@@ -77,6 +77,14 @@
         # fails on Linux Arm
         'spectrum.vsz',
         'hatching.vsz',
+
+        # fails on suse / fedora
+        'contour_labels.vsz',
+        # new arm self test failures
+        'example_import.vsz',
+        'profile.vsz',
+        '1dto2d.vsz',
+
         # don't expect this to work
         'mathml.vsz',
     ])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/veusz-1.21/veusz/dataimport/base.py 
new/veusz-1.21.1/veusz/dataimport/base.py
--- old/veusz-1.21/veusz/dataimport/base.py     2013-12-31 21:18:53.000000000 
+0100
+++ new/veusz-1.21.1/veusz/dataimport/base.py   2014-07-20 14:03:16.000000000 
+0200
@@ -150,15 +150,23 @@
         return f
 
     def _deleteLinkedDatasets(self, document):
-        """Delete linked datasets from document linking to self."""
+        """Delete linked datasets from document linking to self.
+        Returns tags for deleted datasets.
+        """
 
+        tags = {}
         for name, ds in list(document.data.items()):
             if ds.linked == self:
+                tags[name] = document.data[name].tags
                 document.deleteData(name)
+        return tags
 
-    def _moveReadDatasets(self, tempdoc, document):
+    def _moveReadDatasets(self, tempdoc, document, tags):
         """Move datasets from tempdoc to document if they do not exist
-        in the destination."""
+        in the destination.
+
+        tags is a dict of tags for each dataset
+        """
 
         read = []
         for name, ds in list(tempdoc.data.items()):
@@ -171,6 +179,9 @@
                     outname = self.params.renames[name]
 
                 ds.linked = self
+                if name in tags:
+                    ds.tags = tags[name]
+
                 document.setData(outname, ds)
         return read
 
@@ -196,9 +207,9 @@
             return ([], errors)
 
         # delete datasets which are linked and imported here
-        self._deleteLinkedDatasets(document)
+        tags = self._deleteLinkedDatasets(document)
         # move datasets into document
-        read = self._moveReadDatasets(tempdoc, document)
+        read = self._moveReadDatasets(tempdoc, document, tags)
 
         # return errors (if any)
         errors = op.outinvalids
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/veusz-1.21/veusz/dataimport/readcsv.py 
new/veusz-1.21.1/veusz/dataimport/readcsv.py
--- old/veusz-1.21/veusz/dataimport/readcsv.py  2014-04-27 15:02:31.000000000 
+0200
+++ new/veusz-1.21.1/veusz/dataimport/readcsv.py        2014-08-23 
17:15:18.000000000 +0200
@@ -136,6 +136,8 @@
             # loop to find previous valid column
             prevcol = colnum - 1
             while prevcol >= 0:
+                if prevcol not in self.colnames:
+                    break
                 n = self.colnames[prevcol]
                 if len(n) > 0 and n[-1] not in "+-":
                     # we add a \0 here so that there's no chance of the user
@@ -143,9 +145,9 @@
                     name = n + '\0' + name
                     return self.coltypes[prevcol], name
                 prevcol -= 1
-            else:
-                # did not find anything
-                name = self._generateName(colnum)
+
+            # did not find anything
+            name = self._generateName(colnum)
 
         # examine whether object type is at end of name
         # convert, and remove, if is
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/veusz-1.21/veusz/dataimport/simpleread.py 
new/veusz-1.21.1/veusz/dataimport/simpleread.py
--- old/veusz-1.21/veusz/dataimport/simpleread.py       2014-04-27 
15:02:31.000000000 +0200
+++ new/veusz-1.21.1/veusz/dataimport/simpleread.py     2014-08-23 
17:15:18.000000000 +0200
@@ -470,7 +470,7 @@
                     # add on converted text - yuck - double conversion
                     self.remainingline.append('%e' % v)
                 else:
-                    self.remainingline.append(v)
+                    self.remainingline.append(t)
         return True
 
 class SimpleRead(object):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/veusz-1.21/veusz/embed.py 
new/veusz-1.21.1/veusz/embed.py
--- old/veusz-1.21/veusz/embed.py       2014-05-03 10:14:11.000000000 +0200
+++ new/veusz-1.21.1/veusz/embed.py     2014-06-11 19:42:38.000000000 +0200
@@ -224,6 +224,9 @@
             else:
                 possiblecommands += [[
                     '/Applications/Veusz.app/Contents/MacOS/Veusz' ]]
+                possiblecommands += [[
+                    
os.path.expanduser('~/Applications/Veusz.app/Contents/MacOS/Veusz')]]
+
 
         for cmd in possiblecommands:
             # only try to run commands that exist as error handling
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/veusz-1.21/veusz/embed_remote.py 
new/veusz-1.21.1/veusz/embed_remote.py
--- old/veusz-1.21/veusz/embed_remote.py        2014-02-08 13:25:58.000000000 
+0100
+++ new/veusz-1.21.1/veusz/embed_remote.py      2014-08-23 17:15:18.000000000 
+0200
@@ -24,6 +24,7 @@
 from .compat import citems, pickle
 from .windows.simplewindow import SimpleWindow
 from . import document
+from . import setting
 from . import qtall as qt4
 
 """Program to be run by embedding interface to run Veusz commands."""
@@ -57,6 +58,14 @@
         self.ci.addCommand('SetAntiAliasing', self.cmdSetAntiAliasing)
         self.ci.addCommand('_apiVersion', self.cmd_apiVersion)
 
+        setting.transient_settings['unsafe_mode'] = True
+
+        self.document.sigLog.connect(self.logEmitted)
+
+    def logEmitted(self, msg):
+        """Write anything logged to stderr."""
+        sys.stderr.write(msg + '\n')
+
     def cmdClose(self):
         """Close()
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/veusz-1.21/veusz/plugins/datasetplugin.py 
new/veusz-1.21.1/veusz/plugins/datasetplugin.py
--- old/veusz-1.21/veusz/plugins/datasetplugin.py       2014-04-27 
15:02:31.000000000 +0200
+++ new/veusz-1.21.1/veusz/plugins/datasetplugin.py     2014-08-23 
17:15:18.000000000 +0200
@@ -291,7 +291,9 @@
                              perr=ds.perr, nerr=ds.nerr)
         elif ds.dimensions == 2:
             return Dataset2D(name, ds.data,
-                             rangex=ds.xrange, rangey=ds.yrange)
+                             xrange=ds.xrange, yrange=ds.yrange,
+                             xedge=ds.xedge, yedge=ds.yedge,
+                             xcent=ds.xcent, ycent=ds.ycent)
         else:
             raise RuntimeError("Invalid number of dimensions in dataset")
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/veusz-1.21/veusz/plugins/votable.py 
new/veusz-1.21.1/veusz/plugins/votable.py
--- old/veusz-1.21/veusz/plugins/votable.py     2013-12-04 20:29:04.000000000 
+0100
+++ new/veusz-1.21.1/veusz/plugins/votable.py   2014-08-23 17:15:18.000000000 
+0200
@@ -23,7 +23,7 @@
 
 try:
     import astropy.version
-    if astropy.version.version >= 0.2:
+    if [int(x) for x in astropy.version.version.split('.')] >= [0, 2]:
         from astropy.io.votable.table import parse
     else:
         from astropy.io.vo.table import parse
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/veusz-1.21/veusz/setting/setting.py 
new/veusz-1.21.1/veusz/setting/setting.py
--- old/veusz-1.21/veusz/setting/setting.py     2014-04-27 15:02:31.000000000 
+0200
+++ new/veusz-1.21.1/veusz/setting/setting.py   2014-08-23 17:15:18.000000000 
+0200
@@ -1308,7 +1308,7 @@
                 self.val, datatype=self.datatype, dimensions=self.dimensions)
             if ds:
                 # get numpy array of values
-                return ds.data
+                return N.array(ds.data)
         else:
             # list of values
             return N.array(self.val)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/veusz-1.21/veusz/setting/settingdb.py 
new/veusz-1.21.1/veusz/setting/settingdb.py
--- old/veusz-1.21/veusz/setting/settingdb.py   2014-04-27 15:02:31.000000000 
+0200
+++ new/veusz-1.21.1/veusz/setting/settingdb.py 2014-08-23 17:15:18.000000000 
+0200
@@ -21,6 +21,7 @@
 from __future__ import division, print_function
 import sys
 
+import numpy as N
 from .. import qtall as qt4
 
 def _(text, disambiguation=None, context="Preferences"):
@@ -210,7 +211,13 @@
 
 def ui_floattostring(f):
     """Convert float to string with more precision."""
-    if 1e-4 <= abs(f) <= 1e5 or f == 0:
+    if not N.isfinite(f):
+        if N.isnan(f):
+            return 'nan'
+        if f < 0:
+            return '-inf'
+        return 'inf'
+    elif 1e-4 <= abs(f) <= 1e5 or f == 0:
         s = '%.14g' % f
         # strip excess zeros to right
         if s.find('.') >= 0:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/veusz-1.21/veusz/utils/pdf.py 
new/veusz-1.21.1/veusz/utils/pdf.py
--- old/veusz-1.21/veusz/utils/pdf.py   2013-11-09 11:23:50.000000000 +0100
+++ new/veusz-1.21.1/veusz/utils/pdf.py 2014-08-23 17:15:18.000000000 +0200
@@ -18,6 +18,7 @@
 
 from __future__ import division
 import re
+import math
 
 from ..compat import crange
 
@@ -36,9 +37,10 @@
     widthfactor = box[2] / pagewidth
     newbox = ('/MediaBox [%i %i %i %i]' % (
             0, 
-            int(box[3]-widthfactor*requiredheight),
-            int(widthfactor*requiredwidth),
-            int(box[3]))).encode('ascii')
+            int(math.floor(box[3]-widthfactor*requiredheight)),
+            int(math.ceil(widthfactor*requiredwidth)),
+            int(math.ceil(box[3]))
+            )).encode('ascii')
 
     text = text[:m.start()] + newbox + text[m.end():]
     return text
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/veusz-1.21/veusz/widgets/axis.py 
new/veusz-1.21.1/veusz/widgets/axis.py
--- old/veusz-1.21/veusz/widgets/axis.py        2014-04-27 15:02:31.000000000 
+0200
+++ new/veusz-1.21.1/veusz/widgets/axis.py      2014-06-11 19:49:36.000000000 
+0200
@@ -1000,6 +1000,10 @@
 
         If the edge of the plot is within textheight then suppress text
         """
+
+        if outerbounds is None:
+            return False
+
         s = self.settings
         height = utils.FontMetrics( s.get('Label').makeQFont(painter),
                                     painter.device()).height()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/veusz-1.21/veusz/widgets/colorbar.py 
new/veusz-1.21.1/veusz/widgets/colorbar.py
--- old/veusz-1.21/veusz/widgets/colorbar.py    2013-11-09 11:23:50.000000000 
+0100
+++ new/veusz-1.21.1/veusz/widgets/colorbar.py  2014-06-11 19:48:53.000000000 
+0200
@@ -243,7 +243,7 @@
             painter.drawRect( routside )
 
         # actually draw axis
-        axis.Axis._axisDraw(self, bounds, parentposn, outerbounds, painter,
+        axis.Axis._axisDraw(self, bounds, parentposn, None, painter,
                             phelper)
 
 # allow the factory to instantiate a colorbar
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/veusz-1.21/veusz/widgets/key.py 
new/veusz-1.21.1/veusz/widgets/key.py
--- old/veusz-1.21/veusz/widgets/key.py 2013-11-09 11:23:50.000000000 +0100
+++ new/veusz-1.21.1/veusz/widgets/key.py       2014-06-11 19:42:38.000000000 
+0200
@@ -238,6 +238,13 @@
                             maxval = 100,
                             formatting = True) )
 
+        s.add( setting.Bool(
+            'symbolswap',
+            False,
+            descr=_('Put key symbol on right and text on left'),
+            usertext=_('Swap symbol'),
+            formatting=True) )
+
     @classmethod
     def allowedParentTypes(klass):
         from . import graph
@@ -383,7 +390,7 @@
                                               c.getKeyText(i)).getDimensions()
                         maxwidth = max(maxwidth, w)
                         lines = max(1, math.ceil(h/height))
-                    
+
                     totallines += lines
                     entries.append( (c, i, lines) )
 
@@ -451,6 +458,8 @@
 
         textpen = s.get('Text').makeQPen()
 
+        swap = s.symbolswap
+
         # plot dataset entries
         for (plotter, num, xp, yp, lines) in layout:
             xpos = x + xp*(maxwidth+2*height+symbolwidth)
@@ -463,18 +472,28 @@
                 keyoffset = (lines-1)*height/2.0
             elif s.keyAlign == 'bottom':
                 keyoffset = (lines-1)*height
-            
-            plotter.drawKeySymbol(num, painter, xpos, ypos+keyoffset,
+
+            sx = xpos
+            if swap:
+                sx += maxwidth + height
+            plotter.drawKeySymbol(num, painter, sx, ypos+keyoffset,
                                   symbolwidth, height)
             painter.restore()
 
             # write key text
             if showtext:
                 painter.setPen(textpen)
+                if swap:
+                    lx = xpos + maxwidth
+                    alignx = 1
+                else:
+                    lx = xpos + height + symbolwidth
+                    alignx = -1
+
                 utils.Renderer(painter, font,
-                               xpos + height + symbolwidth, ypos,
+                               lx, ypos,
                                plotter.getKeyText(num),
-                               -1, 1).render()
+                               alignx, 1).render()
 
         phelper.setControlGraph(
             self, [ControlKey(self, parentposn, boxposn, boxdims, height)] )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/veusz-1.21/veusz/windows/treeeditwindow.py 
new/veusz-1.21.1/veusz/windows/treeeditwindow.py
--- old/veusz-1.21/veusz/windows/treeeditwindow.py      2014-04-27 
15:02:31.000000000 +0200
+++ new/veusz-1.21.1/veusz/windows/treeeditwindow.py    2014-08-23 
17:15:18.000000000 +0200
@@ -1160,6 +1160,10 @@
 
     def _selectWidgetSiblings(self, w, wtype):
         """Select siblings of widget given with type."""
+
+        if w.parent is None:
+            return
+
         for c in w.parent.children:
             if c is not w and c.typename == wtype:
                 idx = self.treemodel.getWidgetIndex(c)


-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to