mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
Components in the tree sometimes stop responding until deselected and
selected again
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -1,24 +1,20 @@
|
||||
/*
|
||||
|
||||
DIY Layout Creator (DIYLC).
|
||||
Copyright (c) 2009-2018 held jointly by the individual authors.
|
||||
|
||||
This file is part of DIYLC.
|
||||
|
||||
DIYLC is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
DIYLC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with DIYLC. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
*
|
||||
* DIY Layout Creator (DIYLC). Copyright (c) 2009-2018 held jointly by the individual authors.
|
||||
*
|
||||
* This file is part of DIYLC.
|
||||
*
|
||||
* DIYLC is free software: you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* DIYLC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with DIYLC. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.diylc.swing.plugins.tree;
|
||||
|
||||
import java.awt.AlphaComposite;
|
||||
@@ -220,7 +216,8 @@ public class TreePanel extends JPanel {
|
||||
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent e) {
|
||||
plugInPort.setNewComponentTypeSlot(componentType, null);
|
||||
if (plugInPort.getNewComponentTypeSlot() != componentType)
|
||||
plugInPort.setNewComponentTypeSlot(componentType, null);
|
||||
}
|
||||
});
|
||||
final DefaultMutableTreeNode componentNode = new DefaultMutableTreeNode(payload, false);
|
||||
@@ -325,6 +322,15 @@ public class TreePanel extends JPanel {
|
||||
int row = tree.getClosestRowForLocation(e.getX(), e.getY());
|
||||
tree.setSelectionRow(row);
|
||||
getPopup().show(e.getComponent(), e.getX(), e.getY());
|
||||
} else {
|
||||
TreePath path = tree.getClosestPathForLocation(e.getX(), e.getY());
|
||||
DefaultMutableTreeNode node = (DefaultMutableTreeNode) path.getLastPathComponent();
|
||||
if (node != null && node.getUserObject() != null) {
|
||||
Payload payload = (Payload) node.getUserObject();
|
||||
if (payload.getClickListener() != null) {
|
||||
payload.getClickListener().mouseClicked(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1894,6 +1894,10 @@
|
||||
<changeType>BUG_FIX</changeType>
|
||||
<description>Measurement tool shows incorrect readings when zoomed in or out</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>BUG_FIX</changeType>
|
||||
<description>Components in the tree sometimes stop responding until deselected and selected again</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
</changes>
|
||||
<url>https://github.com/bancika/diy-layout-creator/releases</url>
|
||||
</org.diylc.appframework.update.Version>
|
||||
|
||||
Reference in New Issue
Block a user