mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
Right click rotates component while laying out on the canvas
This commit is contained in:
+1
-1
@@ -187,7 +187,7 @@ class CanvasPanel extends JComponent implements Autoscroll {
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent e) {
|
||||
if (e.getButton() == MouseEvent.BUTTON1) {
|
||||
plugInPort.mouseClicked(e.getPoint(), e.isControlDown(), e.isShiftDown(), e
|
||||
plugInPort.mouseClicked(e.getPoint(), e.getButton(), e.isControlDown(), e.isShiftDown(), e
|
||||
.isAltDown(), e.getClickCount());
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -94,7 +94,9 @@ public class CanvasPlugin implements IPlugIn, ClipboardOwner {
|
||||
|
||||
@Override
|
||||
public void mouseReleased(MouseEvent e) {
|
||||
if (e.isPopupTrigger()) {
|
||||
if (plugInPort.getNewComponentTypeSlot() != null) {
|
||||
plugInPort.mouseClicked(e.getPoint(), e.getButton(), false, false, false, 1);
|
||||
} else if (e.isPopupTrigger()) {
|
||||
// Enable actions.
|
||||
boolean enabled = !plugInPort.getSelectedComponents().isEmpty();
|
||||
getCutAction().setEnabled(enabled);
|
||||
|
||||
Reference in New Issue
Block a user