diff --git a/CHANGES.txt b/CHANGES.txt index 8105dfc0abd..2517c417a38 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,10 +8,14 @@ Forge Beta: 07-##-2013 ver 1.4.4 Release Notes ------------- +-All Decks updates- +Can double click row for deck to open it (in addition to clicking edit icon) +Fixed bug where hover effect didn't work the first time hovering over a row that had just been deselected + + -Improvements to color/card Type filters You can now right-click on a color filter button to show only cards of that color, filtering out all other colors. Similar with card type filter buttons. - -In addition, fixed bug where middle and right clicking buttons did the same behavior as left clicking, and fixed bug where clicking multiple buttons quickly (such as filters) while moving the mouse around would result in clicks not registering sometimes. +Fixed bug where middle and right clicking buttons did the same behavior as left clicking, and fixed bug where clicking multiple buttons quickly (such as filters) while moving the mouse around would result in clicks not registering sometimes. - Card Zoomer - diff --git a/src/main/java/forge/gui/toolbox/special/DeckLister.java b/src/main/java/forge/gui/toolbox/special/DeckLister.java index bbc26981330..db2991dded9 100644 --- a/src/main/java/forge/gui/toolbox/special/DeckLister.java +++ b/src/main/java/forge/gui/toolbox/special/DeckLister.java @@ -276,6 +276,7 @@ public class DeckLister extends JPanel implements ILocalRepaint { private class RowPanel extends JPanel { private boolean selected = false; + private boolean hovered = false; private final Deck deck; public RowPanel(final Deck d0) { @@ -289,6 +290,7 @@ public class DeckLister extends JPanel implements ILocalRepaint { this.addMouseListener(new MouseAdapter() { @Override public void mouseEntered(final MouseEvent e) { + RowPanel.this.hovered = true; if (!RowPanel.this.selected) { ((RowPanel) e.getSource()).setBackground(DeckLister.this.clrHover); ((RowPanel) e.getSource()).setOpaque(true); @@ -297,6 +299,7 @@ public class DeckLister extends JPanel implements ILocalRepaint { @Override public void mouseExited(final MouseEvent e) { + RowPanel.this.hovered = false; if (!RowPanel.this.selected) { ((RowPanel) e.getSource()).setBackground(DeckLister.this.clrDefault); ((RowPanel) e.getSource()).setOpaque(false); @@ -305,7 +308,12 @@ public class DeckLister extends JPanel implements ILocalRepaint { @Override public void mousePressed(final MouseEvent e) { - DeckLister.this.selectHandler((RowPanel) e.getSource()); + if (e.getClickCount() == 1) { + DeckLister.this.selectHandler((RowPanel) e.getSource()); + } + else { //edit deck on double click + DeckLister.this.editDeck(RowPanel.this.deck); + } } }); } @@ -313,7 +321,7 @@ public class DeckLister extends JPanel implements ILocalRepaint { public void setSelected(final boolean b0) { this.selected = b0; this.setOpaque(b0); - this.setBackground(b0 ? DeckLister.this.clrActive : DeckLister.this.clrHover); + this.setBackground(b0 ? DeckLister.this.clrActive : (this.hovered ? DeckLister.this.clrHover : DeckLister.this.clrDefault)); } public boolean isSelected() {