mirror of https://gitlab.com/pamhyr/pamhyr2
PamhyrDialog: Fix window list delete whene dialog is done.
parent
45ee8a9662
commit
d85e5c4666
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue