Browse Source

Pull request #6756: REPORT-62275 tab高度弹窗撤销问题

Merge in DESIGN/design from ~FANGLEI/design:release/10.0 to release/10.0

* commit '1b52c54a85171a2e46e2170096c9f66264023d8a':
  REPORT-62275 tab高度弹窗撤销问题
zheng-1641779399395
fanglei 3 years ago
parent
commit
a75436f092
  1. 10
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java
  2. 13
      designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRCardMainBorderLayoutAdapter.java

10
designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java

@ -581,6 +581,16 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
fireSuperTargetModified();
}
public void undoToCurrent() {
UIUtil.invokeLaterIfNeeded(new Runnable() {
@Override
public void run() {
BaseUndoState current = JTemplate.this.getUndoState();
current.applyState();
}
});
}
/**
* 模板更新
*/

13
designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRCardMainBorderLayoutAdapter.java

@ -65,17 +65,8 @@ public class FRCardMainBorderLayoutAdapter extends FRBorderLayoutAdapter {
if (minConstraint > value) {
FineJOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Beyond_Tablayout_Bounds"));
JTemplate<?, ?> jt = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
if (jt != null && jt.getUndoManager().canUndo()) {
// 自适应布局平分高度导致变矮的场景,优先做撤销
UIUtil.invokeLaterIfNeeded(new Runnable() {
@Override
public void run() {
jt.undo();
}
});
} else if (container.getBackupBound() != null) {
// 手动拖动导致变矮的场景
container.setSize(container.getBackupBound().getSize());
if (jt != null) {
jt.undoToCurrent();
}
return true;
} else {

Loading…
Cancel
Save