Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

Commit

Permalink
frmTransect.py and frmPlotViewer.py -- fix crash in view transect cau…
Browse files Browse the repository at this point in the history
…sed by values passed as strings instead of floating point numbers, to resolve issue #334
  • Loading branch information
PaulDudaRESPEC committed Jan 22, 2020
1 parent 72d258f commit 4236f6a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/ui/SWMM/frmTransect.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,5 @@ def btnView_Clicked(self):
frm_plt = frmPlotViewer(df,'xy', 'Transect ' + self.editing_item.name, self.windowIcon(),
self.tblTransect.horizontalHeaderItem(0).text(), self.tblTransect.horizontalHeaderItem(1).text())
frm_plt.setWindowTitle("Transect Viewer")
frm_plt.setWindowModality(QtCore.Qt.ApplicationModal)
frm_plt.show()
4 changes: 2 additions & 2 deletions src/ui/frmPlotViewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ def set_xy_data(self, df, x_title, y_title):
x = []
y = []
for row in range(len(df)):
x.append(df.index[row])
y.append(df.iloc[row][0])
x.append(float(df.index[row]))
y.append(float(df.iloc[row][0]))
self.setData(x, y, x_title, y_title)

self.fig.canvas.draw()
Expand Down

0 comments on commit 4236f6a

Please sign in to comment.