Dialogue Sub-Views

Involved development of the OpenMW construction set.
User avatar
sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

Re: Dialogue Sub-Views

Post by sirherrbatka »

Done. I should handle next/prev buttons and edit lock i guess, right?
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Dialogue Sub-Views

Post by Zini »

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.
User avatar
sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

Re: Dialogue Sub-Views

Post by sirherrbatka »

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 :).
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Dialogue Sub-Views

Post by Zini »

Will do so either later today or tomorrow.
User avatar
sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

Re: Dialogue Sub-Views

Post by sirherrbatka »

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?
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Dialogue Sub-Views

Post by Zini »

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.
User avatar
sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

Re: Dialogue Sub-Views

Post by sirherrbatka »

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.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Dialogue Sub-Views

Post by Zini »

Code: Select all

    if (newRow > mTable->rowCount())
Shouldn't that be

Code: Select all

    if (newRow >= mTable->rowCount())
?
User avatar
sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

Re: Dialogue Sub-Views

Post by sirherrbatka »

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.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Dialogue Sub-Views

Post by Zini »

Okay, let me rephrase that.

Code: Select all

if (newRow > mTable->rowCount())
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.
Post Reply