py_ext/py_ext_xsd.xsd
author Andrey Skvortsov <andrej.skvortzov@gmail.com>
Tue, 25 Sep 2018 18:29:10 +0300
changeset 2341 210cddfa16cf
parent 1315 ff14a66bbd12
permissions -rw-r--r--
Avoid division by zero in case width or height for page are not specified

traceback:
File "/home/developer/WorkData/PLC/beremiz/beremiz/editors/Viewer.py", line 3755, in OnPaint
self.DoDrawing(dc)
File "/home/developer/WorkData/PLC/beremiz/beremiz/editors/Viewer.py", line 3723, in DoDrawing
for y in xrange(self.PageSize[1] - (ystart * SCROLLBAR_UNIT) % self.PageSize[1], int(window_size[1] / self.ViewScale[1]), self.PageSize[1]):
<type 'exceptions.ZeroDivisionError'>: integer division or modulo by zero
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:xhtml="http://www.w3.org/1999/xhtml">
  <xsd:element name="Python">
    <xsd:complexType>
      <xsd:annotation>
        <xsd:documentation>Formatted text according to parts of XHTML 1.1</xsd:documentation>
      </xsd:annotation>
      <xsd:sequence>
        <xsd:any namespace="http://www.w3.org/1999/xhtml" processContents="lax"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>