I am not too familiar with the concept of nested tables (both in general and regarding our implementation). Therefore the amount of advice I can give you is limited.
But we definitely need a generic solution. Did you have a look at what other tables do regarding nested table updates? Do they cope with updates correctly? Thinking about it, I am actually surprised that we didn't see problems here earlier. Either we just didn't notice the problems or the other tables do something different.
I am not sure about the point of inserting the point in the middle. Maybe trace it back to the function calling addRow and see why it is doing that? I noticed a big fat FIXME in that piece of code. If that is still relevant, we may be in even more trouble.
Render Path Grid v2
Re: Render Path Grid v2
So I figured out that the FIXME comment is no longer relevant. As it turns out, whenever a row is modified, there is a signal that gets emitted from the IdTree class which apparently updates all of the views tied to that data. I'll make an attempt at interpreting the output of that signal tomorrow, though I fear that it may be a bit too abstracted to accurately use for the update code.
The rendering bit is almost done. I assume that the pathgrids should only be visible when in the pathgrid editing mode? Also, I was considering making the lines render on top of everything, but I don't know if that would be too annoying. I'm already rendering the lines with a vertical offset, but sometimes that isn't enough.
The rendering bit is almost done. I assume that the pathgrids should only be visible when in the pathgrid editing mode? Also, I was considering making the lines render on top of everything, but I don't know if that would be too annoying. I'm already rendering the lines with a vertical offset, but sometimes that isn't enough.
Re: Render Path Grid v2
No. Pathgrids should be visible while the pathgrid scene elements are enabled (3rd button from the top). We normally do that via the visibility mask. Visibility and editing mode are two completely independent issues.The rendering bit is almost done. I assume that the pathgrids should only be visible when in the pathgrid editing mode?
Vertical offset should do the job. If the user has trouble with seeing the edges, he can always switch off visibility for some other scene elements.Also, I was considering making the lines render on top of everything, but I don't know if that would be too annoying. I'm already rendering the lines with a vertical offset, but sometimes that isn't enough.
Re: Render Path Grid v2
Looks like I will be able to use the signals already implemented.
Some issues I've come across with editing pathgrids:
1. I can't seem to add a new pathgrid record.
2. When adding to the list, points and edges are not correctly inserted in the proper place. If no row is selected, it is inserted at the beginning. If a row is selected, it is inserted after the first row regardless of which row was selected.
3. When removing a point, it also removes the related edges. The view for the edges is updated, but there is an artifact left behind. The rendered table doesn't decrease in size even though the elements in those position are moved up.
Some issues I've come across with editing pathgrids:
1. I can't seem to add a new pathgrid record.
2. When adding to the list, points and edges are not correctly inserted in the proper place. If no row is selected, it is inserted at the beginning. If a row is selected, it is inserted after the first row regardless of which row was selected.
3. When removing a point, it also removes the related edges. The view for the edges is updated, but there is an artifact left behind. The rendered table doesn't decrease in size even though the elements in those position are moved up.
Re: Render Path Grid v2
Regarding #1: I can confirm that the creator bar in the pathgrid table is partially broken. I can add pathgrids for interior cells, but not for exterior cells.
Re: Render Path Grid v2
Can you make it work for already existing interior cells?Zini wrote:I can add pathgrids for interior cells
Re: Render Path Grid v2
Very fancy. However we do have to consider that the pathgrid should look similar to what is shown in the scene visibility selector icons.
No. The pathgrid creator bar isn't set up correctly for exterior style IDs.Can you make it work for already existing interior cells?
Re: Render Path Grid v2
I can make them blue if that's what you mean.Zini wrote:Very fancy. However we do have to consider that the pathgrid should look similar to what is shown in the scene visibility selector icons.