esternin / eXtrema

https://www.physics.brocku.ca/Labs/extrema/
GNU General Public License v2.0
6 stars 1 forks source link

Rewrite GraphicsPage::OnMouseMove() to refresh the display correctly #27

Closed vadz closed 3 years ago

vadz commented 3 years ago

This function is the last one to use wxClientDC and it does it with wxINVERT logical mode which doesn't work at all in GTK 3, so it has to be fixed by deleting the last object and adding the new one.

My main problem is that I don't really understand when this code is used, i.e. what do I need to do to test it. I'll try to understand this later, but if you already know, please tell me, TIA!

esternin commented 3 years ago

My guess is that this is for an interactive repositioning of the text object. When you add a text object, you can delete it, update its text or the text attributes, or reposition it for a fine adjustment.

At least that's how it was in physica (where one would move the cursor and hit a different key depending of what action was to take place: R for reposition, X/Y to shift only one of the two coordinates to the cursor,1-8 to re-anchor the text (1 = lower left of the textbox, 2= lower middle, etc, ccw, D to delete, U to update the text, if memory serves), I assume this is an implementation of something similar.

I see the text dialog now has the anchor buttons instead, an erase, but no "update"/"reposition". Maybe Joe was planning it but did not finish that.

The simplest way is to remove this object and add it back, at the new location, I think you are right.

esternin commented 3 years ago

Is this still open, or did it get fixed in https://github.com/esternin/eXtrema/issues/24 ?

vadz commented 3 years ago

No, this is not fixed yet, I'll try to reproduce/look at/fix this a.s.a.p. but almost surely not today, sorry.

esternin commented 3 years ago

For what it's worth, under Wayland, resizing and/or moving a non-empty window messes it up. This may be related to this redraw? or a separate issue?

image

esternin commented 3 years ago

I think this has been fixed by this merge, closing the issue.