Browse Source

Merge remote-tracking branch 'origin/release/8.0' into release/8.0

master
mengao 7 years ago
parent
commit
99e8fc5bc9
  1. 7
      designer/src/com/fr/grid/IntelliElements.java
  2. 5
      designer_base/src/com/fr/design/mainframe/JTemplate.java
  3. 4
      designer_form/src/com/fr/design/mainframe/FormParaWidgetPane.java

7
designer/src/com/fr/grid/IntelliElements.java

@ -194,7 +194,12 @@ public class IntelliElements {
TemplateCellElement newCellElement = new DefaultTemplateCellElement(colIndex, rowIndex); TemplateCellElement newCellElement = new DefaultTemplateCellElement(colIndex, rowIndex);
applyStyle(newCellElement, sourceCellElement);//style applyStyle(newCellElement, sourceCellElement);//style
if (sourceCellElement.getValue() instanceof DSColumn) { if (sourceCellElement.getValue() instanceof DSColumn) {
DSColumn dsColumn = (DSColumn) sourceCellElement.getValue(); DSColumn dsColumn = null;
try {
dsColumn = (DSColumn) ((DSColumn) sourceCellElement.getValue()).clone();
} catch (CloneNotSupportedException e) {
FRContext.getLogger().error(e.getMessage(), e);
}
newCellElement.setValue(dsColumn); newCellElement.setValue(dsColumn);
newCellElement.setCellExpandAttr(sourceCellElement.getCellExpandAttr()); newCellElement.setCellExpandAttr(sourceCellElement.getCellExpandAttr());
} else if (sourceCellElement.getValue() instanceof Number) { } else if (sourceCellElement.getValue() instanceof Number) {

5
designer_base/src/com/fr/design/mainframe/JTemplate.java

@ -121,7 +121,10 @@ public abstract class JTemplate<T extends IOFile, U extends BaseUndoState<?>> ex
return; return;
} }
long saveTime = System.currentTimeMillis(); // 保存模板的时间点 long saveTime = System.currentTimeMillis(); // 保存模板的时间点
tic.collectInfo(template, this, openTime, saveTime); try {
tic.collectInfo(template, this, openTime, saveTime);
} catch (Throwable th) { // 不管收集过程中出现任何异常,都不应该影响模版保存
}
openTime = saveTime; // 更新 openTime,准备下一次计算 openTime = saveTime; // 更新 openTime,准备下一次计算
} }

4
designer_form/src/com/fr/design/mainframe/FormParaWidgetPane.java

@ -286,7 +286,9 @@ public class FormParaWidgetPane extends JPanel {
private int calculateWidgetWindowRowNum() { private int calculateWidgetWindowRowNum() {
//向上取整 //向上取整
int rowNum = (int) Math.ceil((double) predifinedwidgeList.size() / (double) preWidgetShowMaxNum); int eastRowNum = (int) Math.ceil((double) predifinedwidgeList.size() / (double) preWidgetShowMaxNum);
int westRowNum = (int) Math.ceil((double) loadWidgetOptions().length / (double) commonWidgetNum);
int rowNum = Math.max(eastRowNum, westRowNum);
rowNum = Math.max(rowNum, 2); rowNum = Math.max(rowNum, 2);
rowNum = Math.min(rowNum, preWidgetShowMaxRow); rowNum = Math.min(rowNum, preWidgetShowMaxRow);
return rowNum; return rowNum;

Loading…
Cancel
Save