summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/jrummikub/control/TurnControl.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/jrummikub/control/TurnControl.java b/src/jrummikub/control/TurnControl.java
index f39ec39..768f4f9 100644
--- a/src/jrummikub/control/TurnControl.java
+++ b/src/jrummikub/control/TurnControl.java
@@ -72,6 +72,14 @@ public class TurnControl {
collectionStoneClick(stone, collect);
}
}));
+ connections.add(view.getTablePanel().getStoneCollectionPanel()
+ .getSetClickEvent().add(new IListener2<Stone, Boolean>() {
+
+ @Override
+ public void handle(Stone stone, Boolean collect) {
+ collectionSetClick(stone, collect);
+ }
+ }));
connections.add(view.getTablePanel().getStoneClickEvent()
.add(new IListener2<Stone, Boolean>() {
@@ -140,6 +148,11 @@ public class TurnControl {
view.setSelectedStones(selectedStones);
}
+ private void collectionSetClick(Stone stone, Boolean collect) {
+ selectedStones.clear();
+ view.setSelectedStones(selectedStones);
+ }
+
private void pickUpSelectedStones() {
for (Stone stone : selectedStones) {
hand.pickUp(stone);