mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
doc: dev: Update with PamhyrWindow, and minor change in hash computation.
This commit is contained in:
1 parent
624e9b6f71
commit
e7fd2077bd
3 files changed
+32
-28
No files matched your search
@@ -36,7 +36,10 @@ class ListedSubWindow(object):
|
||||
def sub_win_add(self, name, win):
|
||||
self.sub_win_list.append((name, win))
|
||||
self.sub_win_cnt += 1
|
||||
logger.info(f"Open window: {name} ({self.sub_win_cnt})")
|
||||
try:
|
||||
logger.info(f"Open window: {name}: {self.sub_win_cnt}: {win.hash()}")
|
||||
except:
|
||||
logger.info(f"Open window: {name}: {self.sub_win_cnt}: X")
|
||||
|
||||
def sub_win_del(self, name):
|
||||
self.sub_win_list = list(
|
||||
@@ -46,7 +49,7 @@ class ListedSubWindow(object):
|
||||
)
|
||||
)
|
||||
self.sub_win_cnt = len(self.sub_win_list)
|
||||
logger.info(f"Close window: {name} ({self.sub_win_cnt})")
|
||||
logger.info(f"Close window: {name}: {self.sub_win_cnt}")
|
||||
|
||||
def _sub_win_exists(self, name):
|
||||
return reduce(
|
||||
|
||||
@@ -35,6 +35,7 @@ class PamhyrWindowTools(object):
|
||||
def __init__(self, options = ["undo", "copy"], parent = None, **kwargs):
|
||||
super(PamhyrWindowTools, self).__init__()
|
||||
|
||||
self._hash_data = []
|
||||
self._undo_stack = None
|
||||
|
||||
if "undo" in options:
|
||||
@@ -130,12 +131,7 @@ class PamhyrWindowTools(object):
|
||||
Returns:
|
||||
The hash
|
||||
"""
|
||||
data = [
|
||||
self._study,
|
||||
self._config,
|
||||
]
|
||||
|
||||
return self._hash()
|
||||
return self._hash(self._hash_data)
|
||||
|
||||
|
||||
class PamhyrWindow(ASubMainWindow, ListedSubWindow, PamhyrWindowTools):
|
||||
@@ -152,14 +148,15 @@ class PamhyrWindow(ASubMainWindow, ListedSubWindow, PamhyrWindowTools):
|
||||
self._config = config
|
||||
self._parent = parent
|
||||
|
||||
logger.info(self._pamhyr_name)
|
||||
|
||||
super(PamhyrWindow, self).__init__(
|
||||
name = self._pamhyr_name,
|
||||
ui = self._pamhyr_ui,
|
||||
parent = parent,
|
||||
)
|
||||
|
||||
self._hash_data.append(self._study)
|
||||
self._hash_data.append(self._config)
|
||||
|
||||
self._set_title()
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user