uvemas/ViTables

Add support for links to groups

Opened this issue · 1 comments

At the moment ViTables is not able to display links to groups (external in my case) — these are grayed out and an error is printed because LinkNode does not handle that case.

I have implemented a quick fix, actually two. I can submit a pull request if you want, but I'd need some input as none of these two quick fixes feel completely satisfactory.

Option A: insert the link itself into the node hierarchy

  • patch dbstreemodel.py in several places to treat links as potentially having children
  • patch LinkNode so that it can act as a group
  • add icons

pros: displays the target file in link property dialog; consistent with handling of leaf links
cons: requires constant attention that the parent may be a link and not a group in dbstreemodel.py; duplicate code in LinkNode/GroupNode.

Option B: insert the link target into the node hierarchy

  • in dbstreemodel.py, create a GroupNode for links that resolve to Groups, instead of a LinkNode
  • patch GroupNode so that it resolves links
  • add icons

pros: more localised patching
cons: requires change to the properties dialog to show the target file (I don't know how to do that); not consistent with handling of leaf links

I'll need some time to study the problem. I have to review the actual code dealing with links in ViTables, then consider your proposals and then decide what to do. But for doing all those things I would need some free time and currently I'm too busy. So all I can say now is that I will work on this issue as soon as possible. Sorry for not being more helpful. I'll let you know about any new on this issue.