Skip to content

Commit

Permalink
Modified file bug fixed & CoolProp version with binaries in requeriments
Browse files Browse the repository at this point in the history
  • Loading branch information
jon85p committed Nov 10, 2018
1 parent 80ac165 commit db8537c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 9 additions & 6 deletions pyENL.py
Expand Up @@ -74,6 +74,7 @@ def __init__(self, parent, theme):
self.timeout = opciones_.timeout
self.cuDir = opciones_.cuDir
self.theme = theme
self.nuevo = True # Indica que el archivo es nuevo
self.sizeFont = 12
self.fontUI = QtGui.QFont()
if opciones_.sFontUI:
Expand Down Expand Up @@ -831,7 +832,7 @@ def actualizarNumeroLinea(self):
bloque = self.cajaTexto.firstVisibleBlock()
numFirstLine = bloque.firstLineNumber() #first line visible
numEndLine = self.cajaTexto.blockCount() #numero de la ultima linea

#Se lee la fuente del texto
fuente = QtGui.QFontMetrics(self.fontUI)
width=fuente.width('0') #ancho en pixeles del caracter 0
Expand All @@ -845,15 +846,15 @@ def actualizarNumeroLinea(self):

# numero de caracteres por linea
# nucaporli = 50//width # 50 : ancho predefinido de cadaNumeracion (ancho fijo)
nucaporli = len(str(numEndLine))
nucaporli = len(str(numEndLine))
if nucaporli < 2 : nucaporli = 2 # m铆n de caracteres por linea
width_caja = width*nucaporli
width_caja = width*nucaporli
self.cajaNumeracion.setMaximumSize(QtCore.QSize(width_caja, 16777215))


for i in range(numFirstLine,numEndLine):
# se suma el 1 ya que la numeracion de las lineas start in 0
cursor_nume.insertText((str(i +1)).rjust(nucaporli) )
cursor_nume.insertText((str(i +1)).rjust(nucaporli) )
cursor_nume.insertBlock()

def actualizaInfo(self):
Expand All @@ -867,9 +868,11 @@ def actualizaInfo(self):
return #vemos loca

self.actualizarNumeroLinea()

# Se modific贸 ya el archivo
self.archivoModificado = True
if not self.nuevo:
self.archivoModificado = True
self.nuevo = False
texto = self.cajaTexto.toPlainText()
texto = texto.splitlines()
# self.infoLabel.setText((len(texto)))
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
@@ -1,6 +1,6 @@
numpy>=1.6.2
scipy>=0.16.0
coolprop>=6.1.0
coolprop>=6.2.1
odfpy>=1.3.4
pylatex>=1.0.0
fluids>=0.1.59
Expand Down

0 comments on commit db8537c

Please sign in to comment.