jessaskey/mhedit

Selecting Objects in doesn't work (maybe after a drag drop)

Closed this issue · 5 comments

It seems that once I have two objects in a maze (I had a Pyroid and a Reactoid), once I dragged out the pyroid, I couldn't click on the Reactor and select it again. The only way I was able to selected it was by using the dropdown above the property grid. In some cases, that didn't even work however.

I don't see the described behavior. What I see is that you have to click on the maze object 2x and the 2nd time it works.
I'll look into the 2x and see what's going on in that case and see if I can find something hidden in there.

So in playing with this I noted that you have to perform the "Select the object" and the "Move the Object" operations in 2 separate mouse actions. If you simply click and hold an object (just mouse down event) and then try to drag, it will not "Select and Move" it.

Is this what you are seeing? Would you like a single operation to work this way?

[edit] - I've moved the select code from MouseClick to MouseDown and it now selects and moves in one operation so it's a relatively simple change. Assuming this is what you are seeing.

Pre-Note: I just updated to version 217 and my actions are still as below, I wasn't sure when your edit was and if that was already checked in.

Okay, I can confirm that this is what is happening for sure... just like you say. So here is the User Experience that happens and why it is confusing, plus a potential suggestion on how to fix it...

Do the following

  1. New Maze
  2. Drag out a Reactoid (it is then placed and selected)
  3. Drag out Pyroid (int is then placed and selected)
  4. Now click and hold on the reactoid and drag it.
  5. The Pyroid will now be dropped were you left off the mouse button.

As you said, this is happening because the Pyroid is selected. so you have to click and release on the Reactoid in order for it to become selected, then click-drag-release in order to move it.

However, when the left button is clicked at any point, if there is an object hit under it, that object should become instantly selected... then the subsequent drag will be using that object. I think that follows suit with more of how the UI should work.

It sounds like you might have already done this, but I can't duplicate where the click+drag all works in a single action yet. Thank you!!!!

Yes, that's exactly what I was trying to convey, but you've done a better job. I've not checked in the change yet, it's just in my sandbox. I'll check it into the bug fix branch and move on to the next issue.

Fix is as simple as it sounds, just moving the select object code to the MouseDown event rather than the mouse MouseClick event.