-
Notifications
You must be signed in to change notification settings - Fork 74
add pin feature for production lines #441
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
base: dev
Are you sure you want to change the base?
Conversation
# Conflicts: # changelog.txt
| local model, block, recipe = self:getParameterObjects() | ||
|
|
||
| if block == nil then return end | ||
| if block == nil and (event.item3 ~= nil and event.item3:find("^block_")) then |
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.
Can you please explain to me what this is doing and why?
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.
If there is no Block given, the pin function could be called from production line view. It checks if that pin-button contained information in item3 about the needed information to find the correct production line.
Would need to debug now, to see what exactly is saved in blocks. Can do that on Monday. Should have added comments, I guess it's because I added block _id's to the buttons. There was a good reason why I did that, just can't remember now.
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.
If the pin-panel is opened without a block selected, but with the whole production line the block will always be nil.
So when for example using the pipet function, the block needs to be set. Item3 holds the block id which I double check, because when opening the pin-panel, block needs to be nil and item3 has a different string (if i remember correctly)
Pin-Button is displayed when production-line is selected.
When clicked, all blocks are added to the pin-gui.