Re: [Rosegarden-devel] Undo Toolbar Button Refresh Issue

2022-06-06 Thread mark_at_yahoo via Rosegarden-devel
On 6/6/22 1:59 AM, David Faure wrote: That's an artefact of your debugging technique, due to a not very well known feature of shared libraries called (PLT Procedure Linkage Table). After doing dprintf QGraphicsScene::update, "QGraphicsScene::update\n" if you ask gdb for its breakpoints, yo

Re: [Rosegarden-devel] Undo Toolbar Button Refresh Issue

2022-06-06 Thread David Faure
Debugging this a little bit further (I like tricky bugs) shows a number of surprising facts. 1) One undo step sometimes calls Segment::notifyRemove more than once. This is because BasicCommand::unexecute() calls copyFrom() which does m_segment->erase(m_segment->findTime(m_modifiedEventsStart),

Re: [Rosegarden-devel] Undo Toolbar Button Refresh Issue

2022-06-06 Thread David Faure
On samedi 4 juin 2022 19:24:46 CEST mark_at_yahoo via Rosegarden-devel wrote: > I created ("painted") four notes, each time getting: > > BasicCommand::execute > MatrixScene::handleEventRemoved > QGraphicsScene::update > QGraphicsScene::update > > I have no idea where the second update is coming f

Re: [Rosegarden-devel] Undo Toolbar Button Refresh Issue

2022-06-05 Thread Ted Felix
On 6/5/22 5:19 AM, Philip Leishman wrote: The most puzzling aspect for me is why the bug does not happen with the Ctrl+Z shortcut - this is going through exactly the same code as the toolbar !! Yeah. My theory is that there is some refresh code in Qt that gets confused when the toolbar butt

Re: [Rosegarden-devel] Undo Toolbar Button Refresh Issue

2022-06-05 Thread Philip Leishman
Works for me. A bug fix is a bug fix even if we don't fully understand it. The most puzzling aspect for me is why the bug does not happen with the Ctrl+Z shortcut - this is going through exactly the same code as the toolbar !!   Philip On 6/4/22 22:29, Ted Felix wrote: On 6/4/22 1:24 PM, mar

Re: [Rosegarden-devel] Undo Toolbar Button Refresh Issue

2022-06-04 Thread Ted Felix
On 6/4/22 1:24 PM, mark_at_yahoo via Rosegarden-devel wrote: I have no idea where the second update is coming from. Interesting. I tried tracking it down with gdb, but I guess I don't have the source installed, so it didn't let me. Or I did something wrong. gdb is still not as much fun t

Re: [Rosegarden-devel] Undo Toolbar Button Refresh Issue

2022-06-04 Thread mark_at_yahoo via Rosegarden-devel
I'm way above my pay grade here but I'll spam the list anyway ... I removed the update() call in MatrixScene::handleEventRemove() in [e85854] and confirmed it (mysteriously) fixed the problem. Then I restored it, and ran with: (gdb) dprintf QGraphicsScene::update, "QGraphicsScene::update\n" (

Re: [Rosegarden-devel] Undo Toolbar Button Refresh Issue

2022-06-04 Thread Ted Felix
I think I fixed it. But it makes little sense. So I'm not sure. Read on... First, I confirmed that Philip's change works. Doing a full update() for the pointer position appeared to fix this. So that got me thinking about update()... MatrixScene::handleEventRemoved() calls QGraphics

Re: [Rosegarden-devel] Undo Toolbar Button Refresh Issue

2022-06-03 Thread mark_at_yahoo via Rosegarden-devel
On my build of [e85854] the problem occurs randomly, regardless of whether the playback pointer is inside or outside the active segment. I thought it was related to whether the notes were before or after the pointer but it's still random with respect to that. Also got one crash which I can't re

Re: [Rosegarden-devel] Undo Toolbar Button Refresh Issue

2022-06-03 Thread Yves Guillemot
Indeed I don't see the problem when the pointer is outside the segment and the modification of the update() call seems to fix the bug. (I only quickly tested the current issue and didn't look for any possible regression.) Yves Le 3 juin 2022 à 22H42 (+0200) Philip Leishman a écrit : > I have

Re: [Rosegarden-devel] Undo Toolbar Button Refresh Issue

2022-06-03 Thread Philip Leishman
I have been experimenting a bit here. I can only reproduce the error if the pointer position is within the segment. with the pointer position at the start of the composition try a segment starting at bar 2. I do not get the error. Move the pointer to bar 3 and create a segment from bar 2 to bar

Re: [Rosegarden-devel] Undo Toolbar Button Refresh Issue

2022-06-02 Thread Ted Felix
On 6/2/22 1:06 PM, mark_at_yahoo via Rosegarden-devel wrote: I'm looking forward to seeing the fix. :) Yeah. This is a strange one. So everyone sees it no matter what version of Qt. I'm guessing it was introduced when we added the toolbar undo history dropdown. 21.06 doesn't seem to hav

Re: [Rosegarden-devel] Undo Toolbar Button Refresh Issue

2022-06-02 Thread mark_at_yahoo via Rosegarden-devel
Adding little or no useful information, but FWIW it also happens on 5.9.7 and at least there the note *is* removed from the segment/Composition/Document but remains, only partly drawn, in the matrix editor. Makes sense that it's a graphics problem because the various ways to invoke "undo" all e

Re: [Rosegarden-devel] Undo Toolbar Button Refresh Issue

2022-06-02 Thread Philip Leishman
Also with Qt 6.2.2 reproducible !! Maybe not a Qt bug ?   Philip On 6/2/22 11:26, Yves Guillemot wrote: Le 1 juin 2022 à 20H03 (-0400) Ted Felix a écrit : Anyway, let me know if anyone can reproduce this with Qt versions later than 5.12.8. Thanks. I can reproduce it with Qt 5.15.2.

Re: [Rosegarden-devel] Undo Toolbar Button Refresh Issue

2022-06-02 Thread Yves Guillemot
Le 1 juin 2022 à 20H03 (-0400) Ted Felix a écrit : >Anyway, let me know if anyone can reproduce this with Qt versions > later than 5.12.8. Thanks. > I can reproduce it with Qt 5.15.2. With quarter notes which have been entered backward (from right to left), one note on two is kept undelet

[Rosegarden-devel] Undo Toolbar Button Refresh Issue

2022-06-01 Thread Ted Felix
This one's pretty esoteric. I only have Qt 5.12.8 on my machine and I have a feeling this is a bug in Qt that has probably been fixed. If anyone has a later version of Qt than 5.12.8, can you give this test case a whirl? - Create a big segment. 8 bars or so. - Open the matrix on that seg