[editor only] fix broken multiple selection in resources panel

This commit is contained in:
fgnm
2024-05-07 10:29:41 +02:00
parent 10222338cb
commit 96c89063fa
2 changed files with 7 additions and 5 deletions
@@ -216,9 +216,11 @@ public class BoxItemResourceSelectionUIMediator extends Mediator<BoxItemResource
*/
private void setSelected(BoxItemResource boxResource, boolean isSelected) {
if (isSelected) {
boxResource.switchToMouseOverColor();
boxResource.setHighlightWhenMouseOver(false);
boxResourceSelectedSet.add(boxResource.getPayloadData().name);
if (boxResource.getPayloadData().className != null) {
boxResource.switchToMouseOverColor();
boxResource.setHighlightWhenMouseOver(false);
boxResourceSelectedSet.add(boxResource.getPayloadData().name);
}
} else {
boxResource.switchToStandardColor();
boxResource.setHighlightWhenMouseOver(true);
@@ -131,10 +131,10 @@ public abstract class BoxItemResource extends Group implements DraggableResource
eventType = UIResourcesBoxMediator.CTRL_EVENT_TYPE;
}
if(getPressedButton() == Input.Buttons.LEFT && getTapCount() == 2) {
if(getPressedButton() == Input.Buttons.LEFT) {
Facade.getInstance().sendNotification(UIResourcesBoxMediator.RESOURCE_BOX_LEFT_CLICK, BoxItemResource.this, eventType);
if (doubleClickEventName != null)
if (doubleClickEventName != null && getTapCount() == 2)
Facade.getInstance().sendNotification(doubleClickEventName, doubleClickPayload, eventType);
}