MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   Info On Clips Toolbar 2 (https://www.mobileread.com/forums/showthread.php?t=333892)

Thasaidon 10-10-2020 09:15 AM

Info On Clips Toolbar 2
 
I have been playing with my clips and the two Clips Toolbars.

The first clips toolbar works like it says in the manual. It will hold 20 clips and if necessary overflow to a supplementary toolbar accessed by a tool in the bottom left hand corner of the bar.

The second Clips toolbar for some reason seems only accept nine items. The nine items seems a bit odd to me.

It is not a problem. It just means I have to work one way rather than another. But I am just curious as I would have expected both Clip Bars to have similar features.

KevinH 10-10-2020 09:52 AM

Should be able yo put first 20 in Clips1 and second 20 in clips 2 with no overload. If that doesn't work then it is a bug.

DiapDealer 10-10-2020 03:08 PM

You would need a total of 40 clips to see the second toolbar hold 20 items, I would think.

Thasaidon 10-10-2020 10:23 PM

Quote:

Originally Posted by DiapDealer (Post 4045534)
You would need a total of 40 clips to see the second toolbar hold 20 items, I would think.

Absolutely True :)

I have a list of thirty clips. The first 20 clips show on the first Clip Bar.. Because of the clip names I use, some spill over to the supplementary toolbar.

Of the remaining 10 clips only 9 appear on the second toolbar.

I checked further. I have no groups so I added a dummy clip at the bottom of the Clip Editor.

The Clip which previously was not being displayed on the second Clip Bar was now being shown The second Clip bar was now showing 10 Clips.

The problem seems to be to do with the last clip in the Clip Editor not showing and not the number of clips the second Clip bar can display.

KevinH 10-11-2020 11:26 AM

I took a look at the code in ClipEditorModel that looks up the proper clip entry by clip number and the existing code is very convoluted (to say the least) and it increments the row pointer before completing all of the tests so I think there is an off by one here that only occurs for the very last row of the clipeditor model.

I will try to rewrite this to see if it helps.

Thasaidon 10-11-2020 09:55 PM

Quote:

Originally Posted by KevinH (Post 4045762)
I took a look at the code in ClipEditorModel that looks up the proper clip entry by clip number and the existing code is very convoluted (to say the least) ....

I will try to rewrite this to see if it helps.

Thank you.

Very convoluted code is rarely a good idea. It makes maintenance difficult. I know :smack:

To finish off the second toolbar will display 20 clips. I created a load of dummy clips last night to confirm this.

KevinH 10-13-2020 12:33 PM

Okay just pushed to master a fix for a rare off by one condition that calculated the ClipEditorModelItem from the clip number when the one wanted was in the very last row of the model.

This fix should appear in the upcoming release.

Thasaidon 10-13-2020 10:23 PM

Quote:

Originally Posted by KevinH (Post 4046529)
Okay just pushed to master a fix for a rare off by one condition that calculated the ClipEditorModelItem from the clip number when the one wanted was in the very last row of the model.

This fix should appear in the upcoming release.

Thank you.

And another bug bites the dust.


All times are GMT -4. The time now is 10:51 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.