fritzing / fritzing-app

Fritzing desktop application
http://fritzing.org
Other
4.04k stars 835 forks source link

Cursor still appearing on unselected notes #3281

Open Kehino opened 8 years ago

Kehino commented 8 years ago

After editing and unselecting a note, the cursor remains visible inside it

bartgrefte commented 6 years ago

The cursor also remains visible after exporting to png and pdf, not on the exported svg.

oasis9 commented 3 years ago

Can confirm this is still an issue

failiz commented 3 years ago

I can reproduce this in 0.9.4. I tried to reproduce it in 0.9.5 (development version) and I cannot reproduce it. Could that been caused by a QT bug? In any case, this needs confirmation as I had a weird behaviour: I think I could reproduce it the first time that I tried in 0.9.5. Then, I changed a couple of things and then commented them and the error was not there any more... I cleaned the code and made a clean build, and the error was not there.

failiz commented 3 years ago

OK. I tested it in 0.9.6rc (Windows) and the error is still there but this bug does not always appear. Steps to reproduce:

  1. Open Fritzing.
  2. Go to BB view
  3. Add a note
  4. Try to change the text The cursor remains when you unselect the note

Interestingly, this behaviours does not happen in the SCH view. And a couple of times I could not reproduce it in the BB view after placing a note in the SCH view. Add bug label.

failiz commented 3 years ago

OK, after a bit more testing I found a couple of things. If you open Fritzing and the you go to file->new and then try to reproduce the bug in the second instance, th bug does not show up. It also does not appear if you open Fritzing and a file at the same time (by double clicking a file or by passing the path of the file as argument). It seems a bit weird, initialization issue?

failiz commented 3 years ago

In addition, the left arrow and right arrow move the note, instead of moving the cursor.

failiz commented 3 years ago

Difficult to debug as sometimes is not easy to reproduce (but it happens very frequently). Until now, I found that only happens in the BB view. Not sure why this happens. In other views, the NoteGraphicsTextItem::focusInEvent and NoteGraphicsTextItem::focusOutEvent are fired as soon as you select the text inside the note (or unselect it). This does not always happens in the notes in the BB. I could not also reproduce it if you open a file in Fritzing or open a new app. Thus, a workaround is to save the file and open it again. Any ideas about what could cause this?

KjellMorgenstern commented 3 weeks ago

Testing with Fritzing 1.0.4: This might have changed since the initial bug report was filed.

There are three different ways a note could be selected: image image\ image

The selection of the text inside the note is not affected by the menu option "Edit -> Deselect". This happens always, and should be fixed. I could not see any random behavior as described in this ticket.

failiz commented 3 weeks ago

Still happening in 1.0.4: {38D6D732-BC24-46F1-AF47-D881943D7A94}

I noticed that in the breadboard the cursor is not blinking and it is not render properly (when moving the cursor with the arrows the cursor does not move, but the index position updates as adding a new letter goes the right place )

KjellMorgenstern commented 3 weeks ago

Maybe this is OS specific. I tried on Ubuntu 22.04, cursor behaves as expected, and I could not get to a state that shows a cursor (blinking or not) and no dotted line for the selection at the same time.

Edit: I was able to easily reproduce broken behavior on Windows. Text input ends up in the note, even after it has been deselected, cursor is not blinking.