mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Merge branch 'hydraulics-structure' of gitlab-ssh.irstea.fr:theophile.terraz/pamhyr into hydraulics-structure
This commit is contained in:
commit
4c5281ea30
13 files changed
+50
-29
No files matched your search
@@ -107,7 +107,7 @@ class LateralContributionWindow(PamhyrWindow):
|
||||
self._table[t] = TableModel(
|
||||
table_view=table,
|
||||
table_headers=self._trad.get_dict("table_headers"),
|
||||
editable_headers=True,
|
||||
editable_headers=self._trad.get_dict("table_headers"),
|
||||
delegates={
|
||||
"type": self._delegate_type,
|
||||
"edge": self._delegate_edge,
|
||||
|
||||
@@ -101,4 +101,5 @@ class NewStudyWindow(PamhyrDialog):
|
||||
self._study.use_date(date)
|
||||
else:
|
||||
self._study.use_time()
|
||||
|
||||
self.done(True)
|
||||
@@ -55,11 +55,12 @@ class ListedSubWindow(object):
|
||||
logger.info(f"Close window: ({h}) {self.sub_win_cnt}")
|
||||
|
||||
def _sub_win_exists(self, h):
|
||||
return reduce(
|
||||
res = reduce(
|
||||
lambda acc, el: (acc or (h == (el[1].hash()))),
|
||||
self.sub_win_list,
|
||||
False
|
||||
)
|
||||
return res
|
||||
|
||||
def sub_win_exists(self, h):
|
||||
return self._sub_win_exists(h)
|
||||
|
||||
@@ -119,8 +119,7 @@ class PamhyrTableModel(QAbstractTableModel):
|
||||
|
||||
options = Qt.ItemIsEnabled | Qt.ItemIsSelectable
|
||||
|
||||
if (self._editable_headers or
|
||||
self._headers[column] in self._editable_headers):
|
||||
if self._headers[column] in self._editable_headers:
|
||||
options |= Qt.ItemIsEditable
|
||||
|
||||
return options
|
||||
|
||||
@@ -186,3 +186,8 @@ class PamhyrDialog(ASubWindow, ListedSubWindow, PamhyrWindowTools):
|
||||
self._hash_data.append(self._config)
|
||||
|
||||
self._set_title()
|
||||
|
||||
def done(self, result):
|
||||
if self.parent is not None:
|
||||
self.parent.sub_win_del(self.hash())
|
||||
super(PamhyrDialog, self).done(result)
|
||||
@@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>868</width>
|
||||
<width>1280</width>
|
||||
<height>720</height>
|
||||
</rect>
|
||||
</property>
|
||||
@@ -101,7 +101,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>868</width>
|
||||
<width>1280</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
||||
Reference in new issue
Block a user