IC: Fix row display.

This commit is contained in:
Pierre-Antoine Rouby committed 2023-05-30 17:31:40 +02:00
1 parent 74b914001b
commit 5a900578c8
4 files changed
+8 -6

No files matched your search

+3 -2
View File
@@ -16,14 +16,15 @@ class SetCommand(QUndoCommand):
self._ics = ics
self._row = row
self._column = column
self._old = self._ics.get(self._row)[column]
self._new = new_value
def undo(self):
self._ics.get(self._row)[column] = self._old
self._ics.get(self._row)[self._column] = self._old
def redo(self):
self._ics.get(self._row)[column] = self._new
self._ics.get(self._row)[self._column] = self._new
class AddCommand(QUndoCommand):
def __init__(self, ics, index):
+1 -1
View File
@@ -131,7 +131,7 @@ class InitialConditionsWindow(ASubMainWindow, ListedSubWindow):
def add(self):
rows = self.index_selected_rows()
if self._ics.len(tab) == 0 or len(rows) == 0:
if len(self._ics) == 0 or len(rows) == 0:
self._table.add(0)
else:
self._table.add(rows[0])