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:
Carlos Ruiz 2022-09-12 05:23:42 +02:00 committed by GitHub
parent 3c69ba56a4
commit 9bab16fbff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -609,7 +609,7 @@ public class ADWindowToolbar extends FToolbar implements EventListener<Event>
public void enableSave(boolean enabled)
{
this.btnSave.setDisabled(!enabled);
this.btnSaveAndCreate.setDisabled(!enabled);
this.btnSaveAndCreate.setDisabled(!(isNewEnabled() || isSaveEnable()));
}
public boolean isSaveEnable() {
@ -643,6 +643,7 @@ public class ADWindowToolbar extends FToolbar implements EventListener<Event>
public void enableNew(boolean enabled)
{
this.btnNew.setDisabled(!enabled);
this.btnSaveAndCreate.setDisabled(!(isNewEnabled() || isSaveEnable()));
}
public void enableCopy(boolean enabled)

View File

@ -2598,6 +2598,10 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
if (!retValue)
{
if (CLogger.peekError() == null && ! wasChanged && callback != null) {
callback.onCallback(true);
return;
}
showLastError();
if (callback != null)
callback.onCallback(false);