From 860bb0071bc18d381e428d09134edbebf9c894f2 Mon Sep 17 00:00:00 2001 From: bancika Date: Thu, 16 Aug 2012 14:32:37 +0000 Subject: [PATCH] improved toolbar click reliability --- .../plugins/toolbox/ComponentButton.java | 6 +++--- .../diylc-swing/update.xml | 20 +++++++++++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/ diy-layout-creator --username bancika@gmail.com/diylc-swing/src/org/diylc/swing/plugins/toolbox/ComponentButton.java b/ diy-layout-creator --username bancika@gmail.com/diylc-swing/src/org/diylc/swing/plugins/toolbox/ComponentButton.java index 316781cf..0aeba1a6 100644 --- a/ diy-layout-creator --username bancika@gmail.com/diylc-swing/src/org/diylc/swing/plugins/toolbox/ComponentButton.java +++ b/ diy-layout-creator --username bancika@gmail.com/diylc-swing/src/org/diylc/swing/plugins/toolbox/ComponentButton.java @@ -46,8 +46,8 @@ class ComponentButton extends JButton { addMouseListener(new MouseAdapter() { @Override - public void mouseClicked(MouseEvent e) { - if (e.getClickCount() == 1) { + public void mousePressed(MouseEvent e) { + if (e.getButton() == MouseEvent.BUTTON1) { plugInPort.setNewComponentTypeSlot(componentType); } else { List> components = plugInPort.getCurrentProject().getComponents(); @@ -60,7 +60,7 @@ class ComponentButton extends JButton { plugInPort.updateSelection(newSelection); plugInPort.setNewComponentTypeSlot(null); plugInPort.refresh(); - } + } } }); // addActionListener(new ActionListener() { diff --git a/ diy-layout-creator --username bancika@gmail.com/diylc-swing/update.xml b/ diy-layout-creator --username bancika@gmail.com/diylc-swing/update.xml index bd931d55..35686133 100644 --- a/ diy-layout-creator --username bancika@gmail.com/diylc-swing/update.xml +++ b/ diy-layout-creator --username bancika@gmail.com/diylc-swing/update.xml @@ -625,5 +625,25 @@ http://code.google.com/p/diy-layout-creator/downloads/list + + + 3 + 9 + 0 + + 2012-08-16 20:00:00.000 CET + + + + IMPROVEMENT + Right-click in the toolbar to select all components of the same type + + + IMPROVEMENT + Click on a component in the toolbar sometimes doesn't register + + + http://code.google.com/p/diy-layout-creator/downloads/list + \ No newline at end of file