Skip to content
Snippets Groups Projects
Commit f7d893ea authored by payno's avatar payno
Browse files

[gui][viewer] fix typo: set_urls is part of the ImageStack

parent 48563873
No related branches found
No related tags found
No related merge requests found
......@@ -390,6 +390,24 @@ class ImageStack(_ImageStack):
self._loadingThreads.remove(sender)
self.sigLoaded.emit(url)
def setUrls(self, urls: list):
_ImageStack.setUrls(self, urls)
listWidget = self._urlsTable._urlsTable._listWidget
items = []
for i in range(listWidget.count()):
# TODO: do this on the fly
item = listWidget.item(i)
try:
url = DataUrl(path=item.text())
except Exception:
print('Issue')
_logger.info('fail to deduce data of last modification for '
'{}'.format(item.text()))
else:
lst_m = time.ctime(os.path.getmtime(url.file_path()))
item.setToolTip('last modification : {}'.format(lst_m))
items.append(listWidget.item(i))
class _TomwerUrlLoader(UrlLoader):
"""
......@@ -486,20 +504,3 @@ class _TomwerUrlLoader(UrlLoader):
return data
else:
return data[self.url.data_slice()]
def setUrls(self, urls: list):
_ImageStack.setUrls(self, urls)
listWidget = self._urlsTable._urlsTable._listWidget
items = []
for i in range(listWidget.count()):
# TODO: do this on the fly
item = listWidget.item(i)
try:
url = DataUrl(path=item.text())
except Exception:
_logger.info('fail to deduce data of last modification for '
'{}'.format(item.text()))
else:
lst_m = time.ctime(os.path.getmtime(url.file_path()))
item.setToolTip('last modification : {}'.format(lst_m))
items.append(listWidget.item(i))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment