overte-org / overte

Overte open source virtual worlds platform.
https://overte.org/
Other
136 stars 50 forks source link

Edit menu options are broken. #588

Open Psychpsyo opened 1 year ago

Psychpsyo commented 1 year ago

In the edit dropdown menu in the top left of overte, there is options for cut, copy, paste and delete. Even with the create window open, these options do not work. Except for delete which does work, but it only fires the delete event whenever the Edit dropdown gets opened the next time.

Reproduction Steps:

  1. Open Create menu
  2. Select something
  3. Click Edit -> Delete
  4. Nothing happens
  5. Click Edit
  6. Any selected object gets deleted.
AleziaKurdis commented 1 year ago

There are 2 separated clipboards.

The main Edit menu (Copy, Cut, Paste and Delete) image are the standard function like any other application, they are for text selection.

The Edit menu (Copy, Cut, Paste and Delete) from the Create application - Entity List image are for entities.

But when the Create app is on, the Copy and Cut seems work for Entities (and fail to copy/cut text) The Paste seems to work correctly... pasting text from the Main edit menu and pasting entities from the EntityList menu.

It seems to fight a bit badly.

Armored-Dragon commented 4 weeks ago

Once you press the delete button on the menu, in order for the item to be deleted, any part of the application needs to be interacted with again. Opening the Edit menu again is an interaction.

Armored-Dragon commented 4 weeks ago

Ah I may have found it. The issue seems to be that menu items from the menu bar do not depress after you click them. The edit.js script is waiting for these buttons to be released.

Here's what I think is happening: When you do click on something, Delete for example, it will click and have a "value" of "1". Interacting with most of the application will obviously no longer register that you are pressing the button. However when the menu dropdown is hidden automatically it will not update the pressed state so it will forever think you are holding down the button.

I will do some poking to see if there is any thing I am missing after this, but the easiest solution might be to just update the values from "0" to "1" and ignore the "on-unselected" functionality of these functions.

Armored-Dragon commented 4 weeks ago

It looks like the Create App is just hooking onto an existing "Delete" entry that is created before the Create app can create it itself. This check never seems to be executed? That is my very best guess.