Ticket #729 (new defect)

Opened 9 years ago

File/folder move in Collection Tree

Reported by: ak19 Owned by: nobody
Priority: moderate Milestone:
Component: GLI Severity: major
Keywords: Cc:


The following changes committed with ticket #727 have the side-effect that folders in the CollectionTree? moved onto themselves now also result in the tree getting deselected and therefore in the metadata table not being visible in the EnrichPane?. (Previously, moving CollectionTree? filenodes onto themselves resulted in whatever filenodes were open remaining open and so too any visible metadata associated with the actively selected filenode(s).)

The current changes of ticket #727 for deselecting the CollectionTree? on drag-and-drop takes place in the CollectionTree?'s overridden drop(DropTargetDropEvent?) method do not check for whether the source nodes are dropped on themselves. That check takes place much later in the sequence of events caused by a drag-and-drop: the check is only done when a MOVE FileJob? is being processed (in FileQueue?.java).

Ticket #727, revision 23455: committed src\org\greenstone\gatherer\collection\CollectionTree??.java

Dr Bainbridge fixed the problem with the metadata data getting mixed up at random sometimes when moving folders in the CollectionTree??. The metadata was previously getting mixed up in the MetadataValueTable?? because of a race condition/state inconsistency due to the table trying to update itself when the collection tree was getting updated: when nodes are selected in the tree, which happens on Tree refresh (including file/directory move operations), it fires a valueChanged event which the Table responds to. However, since the filenodes of the tree (and so their associated metadata) are in flux at that point, the table should hold off updating its metadata on such an occasion. The current fix is to clear the selection in the tree upon the drop event of a drag and drop in the tree: no nodes are selected, no selection changed events are fired, the table does not even get displayed because nothing is selected.

Note: See TracTickets for help on using tickets.