IDEMPIERE-5416 Alt+A is used for Create+New - for usability would be good to use it also for New (#1477)
* IDEMPIERE-5416 Alt+A is used for Create+New - for usability would be good to use it also for New * Fix test case reported by Heng Sin
This commit is contained in:
parent
3c69ba56a4
commit
9bab16fbff
|
@ -609,7 +609,7 @@ public class ADWindowToolbar extends FToolbar implements EventListener<Event>
|
||||||
public void enableSave(boolean enabled)
|
public void enableSave(boolean enabled)
|
||||||
{
|
{
|
||||||
this.btnSave.setDisabled(!enabled);
|
this.btnSave.setDisabled(!enabled);
|
||||||
this.btnSaveAndCreate.setDisabled(!enabled);
|
this.btnSaveAndCreate.setDisabled(!(isNewEnabled() || isSaveEnable()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isSaveEnable() {
|
public boolean isSaveEnable() {
|
||||||
|
@ -643,6 +643,7 @@ public class ADWindowToolbar extends FToolbar implements EventListener<Event>
|
||||||
public void enableNew(boolean enabled)
|
public void enableNew(boolean enabled)
|
||||||
{
|
{
|
||||||
this.btnNew.setDisabled(!enabled);
|
this.btnNew.setDisabled(!enabled);
|
||||||
|
this.btnSaveAndCreate.setDisabled(!(isNewEnabled() || isSaveEnable()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void enableCopy(boolean enabled)
|
public void enableCopy(boolean enabled)
|
||||||
|
|
|
@ -2598,6 +2598,10 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
||||||
|
|
||||||
if (!retValue)
|
if (!retValue)
|
||||||
{
|
{
|
||||||
|
if (CLogger.peekError() == null && ! wasChanged && callback != null) {
|
||||||
|
callback.onCallback(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
showLastError();
|
showLastError();
|
||||||
if (callback != null)
|
if (callback != null)
|
||||||
callback.onCallback(false);
|
callback.onCallback(false);
|
||||||
|
|
Loading…
Reference in New Issue