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

Merge branch 'fix-137' into 'master'

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

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