Skip to content

Commit

Permalink
fixed #5673
Browse files Browse the repository at this point in the history
git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@217 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
  • Loading branch information
volayaf committed Jun 4, 2012
1 parent 496d0ae commit 2eb0c74
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/sextante/__init__.py
Expand Up @@ -5,7 +5,7 @@ def name():
def description():
return "SEXTANTE Geoprocessing platform for QGIS"
def version():
return "Version 1.0.5"
return "Version 1.0.7"
def icon():
return "icon.png"
def qgisMinimumVersion():
Expand Down
3 changes: 2 additions & 1 deletion src/sextante/about/about.htm
Expand Up @@ -12,9 +12,10 @@ <h2>SEXTANTE for QGIS</h2>
<li>Michael Nimm (mmqgis algorithms)</li>
<li>Carson Farmer (fTools algorithms)</li>
<li>Julien Malik (Orfeo Toolbox connectors)</li>
<li>Camilo Polymeris (Threading). Developed as part of Google Summer of Code 2012</li>
</ul>
</p>
<p>You are currently using SEXTANTE v1.0.4</p>
<p>You are currently using SEXTANTE v1.0.7</p>
<p>This software is distributed under the terms of the GNU GPL License v2.
<p>For more information, please visit our website at <a href="http://sextantegis.com">http://sextantegis.com</a></p>
</body>
Expand Down
2 changes: 1 addition & 1 deletion src/sextante/metadata.txt
Expand Up @@ -8,7 +8,7 @@
[general]
name=SEXTANTE
description=SEXTANTE for QGIS
version=1.0.5
version=1.0.7
qgisMinimumVersion=1.0
class_name=SextantePlugin
website=www.sextantegis.com
Expand Down
16 changes: 14 additions & 2 deletions src/sextante/modeler/ModelerGraphicItem.py
Expand Up @@ -83,6 +83,17 @@ def removeElement(self):
"Other elements depend on the selected one.\nRemove them before trying to remove it.")

def getAdjustedText(self, text):
font = QtGui.QFont("Verdana", 8)
fm = QtGui.QFontMetricsF(font)
w = fm.width(text)
if w < self.BOX_WIDTH:
return text

text = text[0:-3] + "..."
w = fm.width(text)
while(w > self.BOX_WIDTH):
text = text[0:-4] + "..."
w = fm.width(text)
return text


Expand All @@ -96,10 +107,11 @@ def paint(self, painter, option, widget=None):
painter.setFont(font)
painter.setPen(QtGui.QPen(QtCore.Qt.black))
fm = QtGui.QFontMetricsF(font)
w = fm.width(QtCore.QString(self.getAdjustedText(self.text)))
text = self.getAdjustedText(self.text)
w = fm.width(QtCore.QString(text))
h = fm.height()
pt = QtCore.QPointF(-w/2, h/2)
painter.drawText(pt, self.text)
painter.drawText(pt, text)
if isinstance(self.element, GeoAlgorithm):
if self.elementIndex in self.model.deactivated:
painter.setPen(QtGui.QPen(QtCore.Qt.red))
Expand Down

0 comments on commit 2eb0c74

Please sign in to comment.