* [ 1795685 ] Don't populate readonly lookup
This commit is contained in:
parent
22232d8ee1
commit
01275897b7
|
@ -179,8 +179,9 @@ public class VLookup extends JComponent
|
||||||
// *** VComboBox ***
|
// *** VComboBox ***
|
||||||
if (m_lookup != null && m_lookup.getDisplayType() != DisplayType.Search) // No Search
|
if (m_lookup != null && m_lookup.getDisplayType() != DisplayType.Search) // No Search
|
||||||
{
|
{
|
||||||
// Memory Leak after executing the next two lines ??
|
// Don't have to fill up combobox if it is readonly
|
||||||
m_lookup.fillComboBox (isMandatory(), true, true, false);
|
if (!isReadOnly && isUpdateable)
|
||||||
|
m_lookup.fillComboBox (isMandatory(), true, true, false);
|
||||||
m_combo.setModel(m_lookup);
|
m_combo.setModel(m_lookup);
|
||||||
//
|
//
|
||||||
AutoCompletion.enable(m_combo);
|
AutoCompletion.enable(m_combo);
|
||||||
|
@ -1339,6 +1340,13 @@ public class VLookup extends JComponent
|
||||||
{
|
{
|
||||||
if (m_lookup == null)
|
if (m_lookup == null)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
//no need to refresh readonly lookup, just remove direct cache
|
||||||
|
if (!isReadWrite()) {
|
||||||
|
m_lookup.removeAllElements();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
return m_lookup.refresh();
|
return m_lookup.refresh();
|
||||||
} // refresh
|
} // refresh
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue