mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Tables: Skip table undo commands when data is unchanged (avoid data duplicates in db)
This commit is contained in:
1 parent
c44597dfbd
commit
09997a0074
31 files changed
+120
No files matched your search
@@ -114,6 +114,9 @@ class GeometryProfileTableModel(PamhyrTableModel):
|
||||
column = index.column()
|
||||
|
||||
if role == Qt.EditRole:
|
||||
if self.is_same_data(index, value):
|
||||
return False
|
||||
|
||||
try:
|
||||
if column == 0:
|
||||
self._undo.push(
|
||||
|
||||
@@ -95,6 +95,9 @@ class GeometryReachTableModel(PamhyrTableModel):
|
||||
column = index.column()
|
||||
|
||||
if role == Qt.EditRole and index.column() != 2:
|
||||
if self.is_same_data(index, value):
|
||||
return False
|
||||
|
||||
try:
|
||||
if index.column() == 0:
|
||||
self._undo.push(
|
||||
|
||||
Reference in new issue
Block a user