IDEMPIERE-6054 Create Lines From checkboxes behave erratically (#2266)

- Fix issue with double click and drag to select text mouse gesture.
This commit is contained in:
hengsin 2024-03-15 16:21:38 +08:00 committed by Carlos Ruiz
parent af00731696
commit 7b5d9e578f
2 changed files with 16 additions and 4 deletions

View File

@ -372,6 +372,14 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
prepareTable();
processQueryValue();
}
if (!isLookup() && p_multipleSelection && hasEditable)
{
//use only checkmark for selection of row
//with the default of select by clicking on any cell, the text selection mouse gesture will de-select a selected row
//note that this also disable the selection of text within the listbox
contentPanel.setNonselectableTags("*");
}
}
if (ClientInfo.isMobile()) {

View File

@ -2273,7 +2273,7 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
if (event.getClass().equals(MouseEvent.class)){
return;
}
if (contentPanel.isMultiple() && m_lastSelectedIndex >= 0) {
if (contentPanel.isMultiple() && m_lastSelectedIndex >= 0 && isLookup()) {
contentPanel.setSelectedIndex(m_lastSelectedIndex);
@ -2298,9 +2298,13 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
}
}
}
onDoubleClick();
contentPanel.repaint();
m_lastSelectedIndex = -1;
if (isLookup() || hasZoom())
{
onDoubleClick();
contentPanel.repaint();
m_lastSelectedIndex = -1;
}
}
else if (event.getTarget().equals(confirmPanel.getButton(ConfirmPanel.A_REFRESH)))
{