Bug in SelectionCommandInput's builtin validation

Bug in SelectionCommandInput's builtin validation

nnikbin
Collaborator Collaborator
839 Views
2 Replies
Message 1 of 3

Bug in SelectionCommandInput's builtin validation

nnikbin
Collaborator
Collaborator

 

This post is just a bug report. I am aware that we can use ValidateInputsEventHandler as a workaround

 

It seems that In Fusion 360 commands, if we have more than one SelectionCommandInputs, only the current SelectionCommandInput (which is highlighted by blue color) decides about validation of all  SelectionCommandInputs, just by looking at itself.

 

Suppose we have the following code and command dialog:

 

 

selectionCommandInput1 = inputs.addSelectionInput(commandId + '_selection1', '1st Selection', '')
selectionCommandInput1.setSelectionLimits(1, 1)
selectionCommandInput2 = inputs.addSelectionInput(commandId + '_selection2', '2nd Selection', '') selectionCommandInput2.setSelectionLimits(1, 1)
selectionCommandInput3 = inputs.addSelectionInput(commandId + '_selection3', '3rd Selection', '') selectionCommandInput3.setSelectionLimits(1, 1)

 

 

First Sample Scenario: One input decides about enabling OK Button

Selecting one entity for just one of the above inputs, makes the command's execution button (OK Button) ebnabled, while the the other 2 inputs do not have the minimum required selection (1 selected entity for each one).

 

Capture_12.png

 

Second Sample Scenario: One input decides about disabling OK Button

Suppose we have selected one entity for each input. So the OK Button is enabled. Now clearing the selection for one of the inputs, makes the OK Button disabled (actually in this scenario the result is correct. the OK Button should become disabled)

 

The above scenarios are shown in the linked scrrencast.

 

--------------------

 

Another issue is that 2 or more SelectionCommandInputs can not share the same selected entity. If we select an entity for one of them, we can not select the same entity for the other SelectionCommandInputs. In some scenarios we need shared entities between the inputs.

 

840 Views
2 Replies
Replies (2)
Message 2 of 3

rolandas_vegis
Advocate
Advocate

Just stumbled upon this 7years later and the same bug remains, amazing.

0 Likes
Message 3 of 3

rolandas_vegis
Advocate
Advocate
What's worse is that you can actually click the Ok button, but the execute event does not trigger, because the selects with minimum select set to more than 0 are empty.
0 Likes