-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LineageRegistrationPlugin: add copy spot labels functionality #61
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested the function and it mainly worked as expected with one inconsistency:
Currently, the branch graph shows the label of the last spot that belongs to it, making the label of the last spot the significant label of the branch. This copy label function uses the label of the first spot to copy it to all spots of equivalent branch in the other project. This is okay, as long as users only work on the branch graph, but may lead to inconsistent / unexpected behavior, if the users use both, the branch graph and the spot graph.
I recommend some action to overcome this inconsistency.
{ | ||
for ( final Spot spotA : registration.mapAB.keySet() ) | ||
{ | ||
boolean hasLabel = !Integer.toString( spotA.getInternalPoolIndex() ).equals( spotA.getLabel() ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think, it would be a good idea, if there was a method in the Spot class, which can be used to test, if a label different to the internal pool index exists.
This could maybe even be part of the HasLabel
interface.
public boolean isLabelSet()
{
return pool.label.isSet( this ); // preferable?
// return !Integer.toString( getInternalPoolIndex() ).equals( getLabel() );
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I opened a PR mastodon-sc/mastodon#318 that addresses this suggestion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maarzt mastodon-sc/mastodon#318 has been merged in the meantime. Thus you could update here.
@@ -176,9 +184,12 @@ public LineageRegistrationFrame( Listener listener ) | |||
add( new JLabel( "Sort TrackScheme:" ) ); | |||
add( newOperationButton( "project A", SORT_TRACKSCHEME_TOOLTIP, listener::onSortTrackSchemeAClicked ), "split 2" ); | |||
add( newOperationButton( "project B", SORT_TRACKSCHEME_TOOLTIP, listener::onSortTrackSchemeBClicked ), "wrap" ); | |||
add( new JLabel( "Copy spot labels:" ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering, if Copy spot
labels is the best term here.
The tool tip says that the function works on cell
/ branch
level. I thus ask myself, if copy cell
or branch
label would be a better choice here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The text says now "copy spot labels"
issue #60