IDEMPIERE-1319 Foreign key constraint problem on window "Client info" field Logo.
This commit is contained in:
parent
7eaa63bdbc
commit
f3877f9a3d
|
@ -82,6 +82,8 @@ public class WImageDialog extends Window implements EventListener<Event>
|
|||
if (m_mImage == null)
|
||||
m_mImage = MImage.get (Env.getCtx(), 0);
|
||||
else
|
||||
{
|
||||
if (m_mImage.getData()!=null)
|
||||
{
|
||||
try {
|
||||
AImage aImage = new AImage(m_mImage.getName(), m_mImage.getData());
|
||||
|
@ -91,6 +93,7 @@ public class WImageDialog extends Window implements EventListener<Event>
|
|||
log.log(Level.WARNING, "load image", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fileButton.setLabel(m_mImage.getName());
|
||||
AEnv.showCenterScreen(this);
|
||||
|
@ -183,8 +186,9 @@ public class WImageDialog extends Window implements EventListener<Event>
|
|||
}
|
||||
else if (m_mImage != null && m_mImage.getAD_Image_ID() > 0)
|
||||
{
|
||||
m_mImage.deleteEx(true);
|
||||
m_mImage = null;
|
||||
m_mImage.setBinaryData(null);
|
||||
m_mImage.setName("-");
|
||||
m_mImage.saveEx();
|
||||
}
|
||||
detach();
|
||||
}
|
||||
|
@ -197,6 +201,7 @@ public class WImageDialog extends Window implements EventListener<Event>
|
|||
{
|
||||
AImage img = null;
|
||||
image.setContent(img);
|
||||
fileButton.setLabel("-");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue