Skip to content
Permalink
Browse files

fixed #5673

git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@217 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
  • Loading branch information
volayaf
volayaf committed Jun 4, 2012
1 parent 496d0ae commit 2eb0c740dc0e497d55262a73dbe45451065ee102
@@ -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():
@@ -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>
@@ -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
@@ -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


@@ -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))

0 comments on commit 2eb0c74

Please sign in to comment.
You can’t perform that action at this time.