Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

potlatch2 can't exit from dragging toolbox #3410

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 9 comments
Closed

potlatch2 can't exit from dragging toolbox #3410

openstreetmap-trac opened this issue Jul 23, 2021 · 9 comments

Comments

@openstreetmap-trac
Copy link

Reporter: FK270673
[Submitted to the original trac issue database at 3.03am, Wednesday, 22nd December 2010]

Unfortunately I am sometimes stuck in dragging the small toolbox. After having clicked one of the buttons, the toolbox follows my mouse, but it is impossible to leave the dragging toolbox.

@openstreetmap-trac
Copy link
Author

Author: FK270673
[Added to the original trac issue at 1.12pm, Saturday, 25th December 2010]

Today, it happened again. After merging two ways, I was not able to exit the dragging toolbox with the merge button.

@openstreetmap-trac
Copy link
Author

Author: FK270673
[Added to the original trac issue at 1.15pm, Saturday, 25th December 2010]

The arrow keys are the only keys which obviously react.

@openstreetmap-trac
Copy link
Author

Author: stevage
[Added to the original trac issue at 12.42pm, Wednesday, 29th December 2010]

I can't reproduce this. Any more information? Is there a particular sequence of mouse/keyboard actions that always causes it?

@openstreetmap-trac
Copy link
Author

Author: FK270673
[Added to the original trac issue at 11.35pm, Monday, 24th January 2011]

Clicking merge ways (toolbox) -> loading data forever -> can't exit dragging toolbox

@openstreetmap-trac
Copy link
Author

Author: FK270673
[Added to the original trac issue at 9.30pm, Friday, 28th January 2011]

Now I have identified and solved the problem

It happens exactly when Potlatch2 reaches the local memory limit which was limited to 100kB on my computer. After changing global settings, Potlatch2 was working again.

@openstreetmap-trac
Copy link
Author

Author: stevage
[Added to the original trac issue at 8.48am, Saturday, 5th March 2011]

So in terms of this being a blocker, does that represent a solution or a just a per-user workaround?

@openstreetmap-trac
Copy link
Author

Author: FK270673
[Added to the original trac issue at 10.36am, Monday, 7th March 2011]

Replying to [comment:6 stevage]:

So in terms of this being a blocker, does that represent a solution or a just a per-user workaround?

I would consider it as personal workaround by an experienced user. However, it might distract mappers from using Potlatch2, so there should be a user-friendly solution that enables them to exit the toolbox EASILY and everytime (something like "press Escape or X or whatever to exit the toolbox") and to save their work without workarounds.

Furthermore, it would be better if a popup informs about memory exceed rather than doing strange things that are hard to understand for dumb users.

@openstreetmap-trac
Copy link
Author

Author: Richard
[Added to the original trac issue at 12.42pm, Monday, 7th March 2011]

I genuinely don't think the local memory limit has much to do with it. Potlatch uses very little "local storage" and it's mostly irrelevant to the toolbox. If it does fix it then it's more by accident than design.

I can (just about) reproduce this by doing lots of panning around while it's loading a whole bunch of data. This strongly suggests that the issue is a mouse-up event not being passed through to the Toolbox.

Probably the most feasible solution is to make the Toolbox drag listen to mouse-up events on the Stage, rather than exclusively on the toolbox. For tidiness, we should therefore set up the listener at the start of each drag and remove it at the end, rather than reacting on every single mouse-up that might ever happen in P2. In other words:

Remove super.titleBar.addEventListener(MouseEvent.MOUSE_UP,handleUp); from createChildren in Toolbox.mxml

Add stage.addEventListener(MouseEvent.MOUSE_UP,handleUp) to the handleDown method

Add stage.removeEventListener(MouseEvent.MOUSE_UP,handleUp) to the handleUp method

This'll need to be tested (I presume stage is accessible from any mxml component?) but looks likely to me.

@openstreetmap-trac
Copy link
Author

Author: Richard
[Added to the original trac issue at 1.29pm, Monday, 7th March 2011]

Committed in r25533, let us know if it reoccurs (on a site that's running r25533+, of course :) ).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant