gramps icon indicating copy to clipboard operation
gramps copied to clipboard

Add forwards and backwards navigation using mouse buttons.

Open carlesalbasboix opened this issue 11 months ago • 8 comments

I have added the functionality to go backwards and forwards in NavigationView using the side mouse buttons, just like in a browser.

carlesalbasboix avatar Mar 11 '24 21:03 carlesalbasboix

Good idea.

Nick-Hall avatar Mar 11 '24 22:03 Nick-Hall

Rebased.

Nick-Hall avatar Apr 15 '24 17:04 Nick-Hall

In testing this, I am getting a signal recursion:

Warning: History: Signal recursion blocked. Signals was : active-changed

This occurs at lines 141, 156 and 173 in the file gramps/gui/displaystate.py.

Nick-Hall avatar Apr 15 '24 17:04 Nick-Hall

I cannot see this warning. Are you enabling extra warnings somehow?

carlesalbasboix avatar Apr 15 '24 18:04 carlesalbasboix

The warnings appear in the terminal window. I have no extra warnings or debug options enabled.

I'm testing using the example tree in the person view. I cursor down to add about 5 people to the history and then use the mouse buttons to backwards and forwards. The navigation works but the warnings are concerning.

Nick-Hall avatar Apr 15 '24 18:04 Nick-Hall

I was testing it only in the Charts view. Now I tried the person view and I get the warning, but only when I click the forwards and backwards buttons on the mouse very fast. If I hold down Alt + Left I get the same warning. I think the problem is emitting a signal to change the active person before the previous one has finished processing.

carlesalbasboix avatar Apr 15 '24 18:04 carlesalbasboix

I think I have fixed the problem by preventing forwards/backwards navigation while history is locked.

carlesalbasboix avatar Apr 24 '24 19:04 carlesalbasboix

An observation about something that may give a false impression of 'flakeyness' the improved mouse forward/back navigation...

When committing a new object to Gramps via the Object Editors, that new object is not added to the History.

I'm NOT suggesting that the active object focus should shift to the new object after an Add. Effectively, the active object briefly shifts to the new object as the commit occurs, then back to where it was. So maybe the History should push an item into the list?

emyoulation avatar Apr 24 '24 19:04 emyoulation

@carlesalbasboix Thank you. It looks like you fixed the problem. I'll merge this now.

Nick-Hall avatar May 14 '24 21:05 Nick-Hall