mirror of https://gitlab.com/pamhyr/pamhyr2
Compare commits
No commits in common. "7d42c164fc76021c9e6fc7c125c3e52771ed9811" and "e7b63fe2705520d97a02093c9ee425a45b02f1d6" have entirely different histories.
7d42c164fc
...
e7b63fe270
|
|
@ -277,7 +277,6 @@ class SedimentLayer(SQLSubModel):
|
||||||
"FROM sedimentary_layer "
|
"FROM sedimentary_layer "
|
||||||
)
|
)
|
||||||
|
|
||||||
if table is not None:
|
|
||||||
for row in table:
|
for row in table:
|
||||||
sl = cls(
|
sl = cls(
|
||||||
id=row[0],
|
id=row[0],
|
||||||
|
|
|
||||||
|
|
@ -311,12 +311,7 @@ class TableModel(PamhyrTableModel):
|
||||||
current_reach = int(line[1]) - 1
|
current_reach = int(line[1]) - 1
|
||||||
if (current_reach <= len(self._data.enable_edges()) and
|
if (current_reach <= len(self._data.enable_edges()) and
|
||||||
current_reach >= 0) :
|
current_reach >= 0) :
|
||||||
data.append(
|
data.append([self._data.enable_edges()[current_reach], float(line[2]), float(line[3])])
|
||||||
[self._data.enable_edges()[current_reach],
|
|
||||||
float(line[2]),
|
|
||||||
float(line[3])
|
|
||||||
]
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
if (current_reach <= len(self._data.enable_edges()) and
|
if (current_reach <= len(self._data.enable_edges()) and
|
||||||
current_reach >= 0) :
|
current_reach >= 0) :
|
||||||
|
|
|
||||||
|
|
@ -256,7 +256,7 @@ class ImportCommand(QUndoCommand):
|
||||||
|
|
||||||
def redo(self):
|
def redo(self):
|
||||||
self._lcs.delete_i(self._tab, self._old_rows)
|
self._lcs.delete_i(self._tab, self._old_rows)
|
||||||
if self._new_lc is None:
|
if self._new_lc == None:
|
||||||
self._new_lc = []
|
self._new_lc = []
|
||||||
for row, data in enumerate(self._data):
|
for row, data in enumerate(self._data):
|
||||||
new = LateralContrib(status=self._lcs._status)
|
new = LateralContrib(status=self._lcs._status)
|
||||||
|
|
@ -270,7 +270,6 @@ class ImportCommand(QUndoCommand):
|
||||||
for row, el in enumerate(self._new_lc):
|
for row, el in enumerate(self._new_lc):
|
||||||
self._lcs.insert(self._tab, row, el)
|
self._lcs.insert(self._tab, row, el)
|
||||||
|
|
||||||
|
|
||||||
class DuplicateCommand(QUndoCommand):
|
class DuplicateCommand(QUndoCommand):
|
||||||
def __init__(self, lcs, tab, rows, lc):
|
def __init__(self, lcs, tab, rows, lc):
|
||||||
QUndoCommand.__init__(self)
|
QUndoCommand.__init__(self)
|
||||||
|
|
|
||||||
|
|
@ -494,7 +494,7 @@ class ResultsWindow(PamhyrWindow):
|
||||||
table = self.find(QTableView, f"tableView_profile")
|
table = self.find(QTableView, f"tableView_profile")
|
||||||
indexes = table.selectedIndexes()
|
indexes = table.selectedIndexes()
|
||||||
if len(indexes) == 0:
|
if len(indexes) == 0:
|
||||||
return []
|
return 0
|
||||||
|
|
||||||
return [i.row() for i in indexes]
|
return [i.row() for i in indexes]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue