Skip to content
Snippets Groups Projects
Commit c234091f authored by Tobias Ullerich's avatar Tobias Ullerich
Browse files

Fixed swap drag'n'drop mode (Fixed #137)

parent bfb51a01
No related branches found
No related tags found
No related merge requests found
......@@ -108,6 +108,7 @@ public class Project {
}
}
}
Page page = pages.get(index.getPagePosition());
page.setPad(index.getId(), pad);
}
......
......@@ -205,9 +205,8 @@ public class Page implements Cloneable {
* @param pad pad
*/
public void setPad(int id, Pad pad) {
if (pad == null) {
pads.removeIf(p -> p.getPosition() == id);
} else {
if (pad != null) {
pads.add(pad);
pad.setPage(this);
pad.setPosition(id);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment