* unregister bug, fixed minor error in disposing of vtabbedpane and gridcontroller.

This commit is contained in:
Heng Sin Low 2007-02-16 21:54:12 +00:00
parent 1b8cbd2eee
commit d920109b47
2 changed files with 11 additions and 5 deletions

View File

@ -199,13 +199,19 @@ public class GridController extends CPanel
log.config( "(" + m_mTab.toString() + ")");
// clear info
stopEditor(false);
if (m_mTab.needSave(true, false))
m_mTab.dataIgnore();
if (m_mTab.isLoadComplete())
{
if (m_mTab.needSave(true, false))
m_mTab.dataIgnore();
}
vIncludedGC = null;
// Listeners
m_mTab.getTableModel().removeDataStatusListener(this);
m_mTab.getTableModel().removeVetoableChangeListener(this);
if (m_mTab.isLoadComplete())
{
m_mTab.getTableModel().removeDataStatusListener(this);
m_mTab.getTableModel().removeVetoableChangeListener(this);
}
vTable.getSelectionModel().removeListSelectionListener(this);
m_mTab.removePropertyChangeListener(vTable);

View File

@ -139,7 +139,7 @@ public class VTabbedPane extends CTabbedPane
else if (comp[i] instanceof GridController)
{
GridController gc = (GridController)comp[i];
gc.addDataStatusListener(aPanel);
gc.removeDataStatusListener(aPanel);
gc.dispose();
}
}