Dialogue Sub-Views
- sirherrbatka
- Posts: 2159
- Joined: 07 Aug 2011, 17:21
Re: Dialogue Sub-Views
Done. I should handle next/prev buttons and edit lock i guess, right?
Re: Dialogue Sub-Views
Edit lock should be handled, yes. We are doing that already in the command system, but it would be helpful to not even let the user edit things in the first place when editing is not allowed.
Next/prev buttons are a bit more complicated. I think changing the ID of an existing subview isn't support yet. Also, we need to be very careful with these buttons to not clutter up the sub view.
Next/prev buttons are a bit more complicated. I think changing the ID of an existing subview isn't support yet. Also, we need to be very careful with these buttons to not clutter up the sub view.
- sirherrbatka
- Posts: 2159
- Joined: 07 Aug 2011, 17:21
Re: Dialogue Sub-Views
http://wstaw.org/m/2014/03/12/zrzut98.png
Works. Now just find how to change id of the base subview…
PS
Next and prev buttons are mostly done (missing skiping deleled records and undeleting but it is not hard to make). Not sure if this is correct way of handling changind the universalid. If you could, zini, take a look at the Editor-Dialog branch, it would be great .
Works. Now just find how to change id of the base subview…
PS
Next and prev buttons are mostly done (missing skiping deleled records and undeleting but it is not hard to make). Not sure if this is correct way of handling changind the universalid. If you could, zini, take a look at the Editor-Dialog branch, it would be great .
Re: Dialogue Sub-Views
Will do so either later today or tomorrow.
- sirherrbatka
- Posts: 2159
- Joined: 07 Aug 2011, 17:21
Re: Dialogue Sub-Views
Panic! SEGFAULT!
It seems that IdTable::rowCount() can segfault if there are deleted records – to replicate i recomend to build my branch, create a new mod, open table (preferable regions), delelete one of the regions, try to edit in my view, keep pressing next untill crash.
Also – context menu in references table does not work.
PS:
why dataChanged is not emitted when deleting record?
It seems that IdTable::rowCount() can segfault if there are deleted records – to replicate i recomend to build my branch, create a new mod, open table (preferable regions), delelete one of the regions, try to edit in my view, keep pressing next untill crash.
Also – context menu in references table does not work.
PS:
why dataChanged is not emitted when deleting record?
Re: Dialogue Sub-Views
Can't comment about the other issues, but regarding the context menu: There is a bug, that I introduced in my view menu item implementation. Sorry about that. btw. that only affects references in exterior cells. I have a fix in my preview branch, but that branch is in a really unfinished state.
- sirherrbatka
- Posts: 2159
- Joined: 07 Aug 2011, 17:21
Re: Dialogue Sub-Views
ok, i hope you can take a look in other issues. No need to rush, i can work on enabling drag and drop in the meantime.
Re: Dialogue Sub-Views
Code: Select all
if (newRow > mTable->rowCount())
Code: Select all
if (newRow >= mTable->rowCount())
- sirherrbatka
- Posts: 2159
- Joined: 07 Aug 2011, 17:21
Re: Dialogue Sub-Views
IIRC i tried both versions. It crashed so i changed to it – but it was keep on crashing so i launched debugger and found out that it crashes not at the creating model item but on calling rowCount. I figured out that no matter what i do i won't be able to finish feature without your insight on the above issue.
Re: Dialogue Sub-Views
Okay, let me rephrase that.
is wrong. That is an off-by-one error.
As for mTable->rowCount() failing, the most likely reason would be that you don't have a valid table in the first place. If that is not the problem, then you have to produce a stack backtrace, so we can see where exactly the crash is happening.
Code: Select all
if (newRow > mTable->rowCount())
As for mTable->rowCount() failing, the most likely reason would be that you don't have a valid table in the first place. If that is not the problem, then you have to produce a stack backtrace, so we can see where exactly the crash is happening.