Skip to content

Commit 457499f

Browse files
author
Open Lowcode SAS
committed
Close #133
1 parent cd09411 commit 457499f

File tree

1 file changed

+7
-25
lines changed

1 file changed

+7
-25
lines changed

src/org/openlowcode/client/graphic/widget/CObjectArray.java

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -495,12 +495,10 @@ public ReadOnlyMouseHandler(
495495

496496
@Override
497497
public void handle(MouseEvent mouseevent) {
498-
logger.warning(" ----> Mouse Event detected inside Object array ");
499-
if (mouseevent.getClickCount() == 2 && mouseevent.isShiftDown()) {
500-
501-
thisobjectarray.copyTableToClipboard(false);
502-
}
503-
if (!mouseevent.isShiftDown())
498+
logger.fine(" ----> Mouse Event detected inside Object array ");
499+
500+
// only transmit click if double click, single click stays local
501+
if (!mouseevent.isShiftDown()) if (mouseevent.getClickCount()>1)
504502
if (isregisteredaction)
505503
if (thisobjectarray.thistable.getSelectionModel().getSelectedItem() != null) {
506504
logger.severe(" --> launching handling of event");
@@ -547,24 +545,7 @@ public void handle(MouseEvent event) {
547545
MouseButton button = event.getButton();
548546

549547
if (button == MouseButton.PRIMARY) {
550-
if (event.getClickCount() == 1 && (event.isShiftDown())) {
551-
552-
if (!thisobjectarray.updatemodeactive) { // currently, table in read mode, move to
553-
logger.fine("moving tableview " + thisobjectarray.name + " to update mode");
554-
thisobjectarray.thistable.setEditable(true);
555-
thisobjectarray.thistable.getSelectionModel().setCellSelectionEnabled(true);
556-
thisobjectarray.thistable.setBackground(thisobjectarray.editablebackground);
557-
thisobjectarray.updatemodeactive = true;
558-
thisobjectarray.startupdate.setDisable(true);
559-
thisobjectarray.commitupdate.setDisable(false);
560-
561-
} else { // currently, table in update mode, update all changed rows and move back to
562-
// read-only
563-
564-
thisobjectarray.launchupdate(null, event);
565-
566-
}
567-
}
548+
568549
if (event.getClickCount() == 1 && (!event.isShiftDown())) {
569550
if (thisobjectarray.thistable.getEditingCell() == null) {
570551
@SuppressWarnings("unchecked")
@@ -577,7 +558,7 @@ public void handle(MouseEvent event) {
577558
}
578559
}
579560
// checking that something is actually selecting when double-clicking.
580-
if ((event.getClickCount() > 1) || (event.getClickCount() == 1 && event.isControlDown()))
561+
if (event.getClickCount() > 1)
581562
if (thisobjectarray.thistable.getSelectionModel().getSelectedItem() != null) {
582563
// trigger the action on double click only if updatemode is not active
583564
if (!thisobjectarray.updatemodeactive) {
@@ -682,6 +663,7 @@ public Node getNode(
682663
thistable.setBackground(editablebackground);
683664

684665
} else {
666+
thistable.getSelectionModel().setCellSelectionEnabled(false);
685667
startupdate.setDisable(false);
686668
commitupdate.setDisable(true);
687669

0 commit comments

Comments
 (0)