-
Notifications
You must be signed in to change notification settings - Fork 134
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
Half the recipes in a folder are moved when dragged-and-dropped into another folder #195
Comments
It is predictable behavior. You will move n/2 or (n+1)/2 items, depending on if there are an even or odd number of items in the folder you are moving. Subfolders in the folder being moved will make things less predictable. The work around is mildly annoying. Create the target subfolder(s) and move just the recipes into place. I will get a patch together later, but I really need to consider what happens when moving folders with multiple subfolders. |
Moving folders used childCount() as the test condition in a for loop. Because I moved the children into the new folder, childCount() got decremented by one. This resulted in the loop counter getting incremented, the test condition getting decremented and me moving only about half the children. The fix is a bit more involved, since I don't move folders. I capture the starting childCount at the start and use that for the test condition, and I only take the first non-folder child through the whole operation. The only tricky part is that I don't move folders, so I have to increment a counter to indicate where the first non-folder item is.
Should be closed w/ pul request 197 |
The rebase generated way too many collisions. It was faster to create a new branch. Moving folders used childCount() as the test condition in a for loop. Because I moved the children into the new folder, childCount() got decremented by one. This resulted in the loop counter getting incremented, the test condition getting decremented and me moving only about half the children. The fix is a bit more involved, since I don't move folders. I capture the starting childCount at the start and use that for the test condition, and I only take the first non-folder child through the whole operation. The only tricky part is that I don't move folders, so I have to increment a counter to indicate where the first non-folder item is.
Closed in #200. |
I am experiencing some strange behavior in version 2.3.0.
When a folder containing recipes is dragged inside another folder only some of the recipes in the folder are moved.
At first it appears as though the recipes not moved have disappeared, but after saving and closing Brewtarget the recipes will be in there original location when the software is reopened.
I attached a couple screen shots showing what I am talking about.
The text was updated successfully, but these errors were encountered: