[ 1805503 ] UI allows changing record while new record not saved
This commit is contained in:
parent
2a14e6d2d0
commit
271966a547
|
@ -2065,10 +2065,19 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
|
|
||||||
// Row range check
|
// Row range check
|
||||||
int newRow = verifyRow(targetRow);
|
int newRow = verifyRow(targetRow);
|
||||||
|
|
||||||
// Check, if we have old uncommitted data
|
// Check, if we have old uncommitted data
|
||||||
m_mTable.dataSave(newRow, false);
|
if (m_mTable.dataSave(newRow, false) == false)
|
||||||
|
return m_currentRow;
|
||||||
|
|
||||||
|
//remove/ignore new and unchange row
|
||||||
|
if (m_mTable.isInserting())
|
||||||
|
{
|
||||||
|
if (newRow > m_currentRow)
|
||||||
|
newRow--;
|
||||||
|
dataIgnore();
|
||||||
|
}
|
||||||
|
|
||||||
// new position
|
// new position
|
||||||
return setCurrentRow(newRow, true);
|
return setCurrentRow(newRow, true);
|
||||||
} // navigate
|
} // navigate
|
||||||
|
|
|
@ -870,7 +870,8 @@ public class GridTable extends AbstractTableModel
|
||||||
// Can we edit?
|
// Can we edit?
|
||||||
if (!m_open || m_readOnly // not accessible
|
if (!m_open || m_readOnly // not accessible
|
||||||
|| row < 0 || col < 0 // invalid index
|
|| row < 0 || col < 0 // invalid index
|
||||||
|| m_rowCount == 0) // no rows
|
|| m_rowCount == 0 // no rows
|
||||||
|
|| row >= m_rowCount ) //invalid row
|
||||||
{
|
{
|
||||||
log.finest("r=" + row + " c=" + col + " - R/O=" + m_readOnly + ", Rows=" + m_rowCount + " - Ignored");
|
log.finest("r=" + row + " c=" + col + " - R/O=" + m_readOnly + ", Rows=" + m_rowCount + " - Ignored");
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue