Opened 8 years ago
Closed 7 years ago
#13467 closed enhancement (fixed)
Add a new DataSelectionListener and use it to manage the selection.
Reported by: | michael2402 | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 18.06 |
Component: | Core | Version: | |
Keywords: | gsoc-core | Cc: | Don-vip, bastiK, stoecker |
Description (last modified by )
Commits:
- 626c26f: Add a new DataSelectionListener and use it to manage the selection.
Stats:
.../josm/data/osm/DataSelectionListener.java | 291 ++++++++++++++++++++ src/org/openstreetmap/josm/data/osm/DataSet.java | 302 +++++++++------------ 2 files changed, 422 insertions(+), 171 deletions(-)
Attachments (2)
Change History (33)
by , 8 years ago
Attachment: | patch-dataset-selection-listener.patch added |
---|
comment:1 by , 8 years ago
comment:2 by , 8 years ago
Description: | modified (diff) |
---|
Same answer.
I'll have to get travis fixed first, problem is not with the patch. I'm currently working on getting that fixed (finding out why tests are failing, fixing warnings, ...)
comment:3 by , 8 years ago
Milestone: | → 16.09 |
---|
comment:4 by , 8 years ago
Milestone: | 16.09 → 16.10 |
---|
comment:8 by , 8 years ago
Milestone: | 16.12 → 17.01 |
---|
comment:9 by , 8 years ago
Milestone: | 17.01 → 17.02 |
---|
comment:10 by , 8 years ago
Milestone: | 17.02 → 17.03 |
---|
comment:11 by , 8 years ago
Milestone: | 17.03 → 17.04 |
---|
comment:12 by , 8 years ago
Milestone: | 17.04 → 17.05 |
---|
by , 8 years ago
Attachment: | patch-13467.patch added |
---|
comment:13 by , 8 years ago
Updated the patch to the current version.
There are still some calls to fireSelectionChanged()
of which I did not figure out why they are there. The selection is completely handled by the DataSet
, so there should be no need for this.
I'd also suggest to replace all uses of the static DataSet.addSelectionListener()
using SelectionEventManager.getInstance().addSelectionListener()
. This now tracks edit layer changes.
comment:15 by , 8 years ago
Milestone: | 17.05 → 17.06 |
---|
comment:16 by , 8 years ago
Milestone: | 17.06 → 17.07 |
---|
comment:17 by , 7 years ago
Milestone: | 17.07 → 17.08 |
---|
comment:18 by , 7 years ago
Milestone: | 17.08 → 17.09 |
---|
comment:19 by , 7 years ago
Milestone: | 17.09 → 17.10 |
---|
comment:20 by , 7 years ago
It appears, most (if not all) of the patch has been committed in [12048]. Is this ticked fixed?
follow-up: 22 comment:21 by , 7 years ago
Summary: | [Patch] Add a new DataSelectionListener and use it to manage the selection. → Add a new DataSelectionListener and use it to manage the selection. |
---|
I applied the patch.
So the new interface is already in trunk.
There are still many places using the old SelectionChangedListener
. We should decide to drop it completely (which would be what I prefer) or to keep it.
follow-up: 23 comment:22 by , 7 years ago
Replying to michael2402:
I applied the patch.
So the new interface is already in trunk.
Okay, good to know. :)
There are still many places using the old
SelectionChangedListener
. We should decide to drop it completely (which would be what I prefer) or to keep it.
DatSet.addSelectionListener(SelectionChangedListener)
does the same as SelectionEventManager.getInstance().addSelectionListener(DataSelectionListener)
so it is redundant, right?
comment:23 by , 7 years ago
Replying to bastiK:
There are still many places using the old
SelectionChangedListener
. We should decide to drop it completely (which would be what I prefer) or to keep it.
DatSet.addSelectionListener(SelectionChangedListener)
does the same asSelectionEventManager.getInstance().addSelectionListener(DataSelectionListener)
so it is redundant, right?
Sort of.
DataSelectionListener is more advanced and will tell you more about the actual selection changes.
And it will only fire on changes of the edit layer.
Aditionally, it will fire when the edit layer was changed and the selection was changed due to the edit layer change (it fires a unselect old - select new). So components to not need to track the edit layer themselves (solved some bugs in the UI where it did not refresh correctly).
comment:24 by , 7 years ago
Milestone: | 17.10 → 17.11 |
---|
comment:25 by , 7 years ago
Milestone: | 17.11 → 17.12 |
---|
comment:26 by , 7 years ago
Milestone: | 17.12 → 18.01 |
---|
comment:27 by , 7 years ago
Milestone: | 18.01 → 18.02 |
---|
comment:28 by , 7 years ago
Milestone: | 18.02 → 18.03 |
---|
comment:29 by , 7 years ago
Milestone: | 18.03 |
---|
comment:30 by , 7 years ago
Milestone: | → 18.06 |
---|
same question regarding travis status ("build failing")