diff --git a/client/src/org/compiere/grid/GridController.java b/client/src/org/compiere/grid/GridController.java index ad2d59e894..6dbf91eb62 100644 --- a/client/src/org/compiere/grid/GridController.java +++ b/client/src/org/compiere/grid/GridController.java @@ -777,8 +777,14 @@ public class GridController extends CPanel } else { - if (rowTable != rowCurrent) - m_mTab.navigate(rowTable); + if (rowTable != rowCurrent) { + //make sure table selection is consistent with model + int t = m_mTab.navigate(rowTable); + if (t != rowTable) { + rowTable = t; + vTable.setRowSelectionInterval(rowTable, rowTable); + } + } dynamicDisplay(0); } diff --git a/client/src/org/compiere/grid/ed/VLookup.java b/client/src/org/compiere/grid/ed/VLookup.java index fee2790438..56e9f62986 100644 --- a/client/src/org/compiere/grid/ed/VLookup.java +++ b/client/src/org/compiere/grid/ed/VLookup.java @@ -498,7 +498,8 @@ public class VLookup extends JComponent if (notFound) // { m_value = null; - actionCombo (null); // data binding + if (!m_inserting) + actionCombo (null); // data binding log.fine(m_columnName + "=" + value + ": Not found"); } // we have lookup @@ -517,7 +518,8 @@ public class VLookup extends JComponent if (m_combo.getSelectedItem() == null) { log.info(m_columnName + "=" + value + ": not in Lookup - set to NULL"); - actionCombo (null); // data binding (calls setValue again) + if (!m_inserting) + actionCombo (null); // data binding (calls setValue again) m_value = null; } }