Browse Source

Merge pull request #251 in DESIGN/design from ~MATA.LI/designrel:release/10.0 to release/10.0

* commit '7675f2ad2775156c40488a0a3564fee773631e43':
  REPORT-9845 & REPORT-9849 & REPORT-9883
  REPORT-9845 & REPORT-9849 & REPORT-9883
master
Mata.Li 6 years ago
parent
commit
a64caed38a
  1. 5
      designer-base/src/main/java/com/fr/design/file/HistoryTemplateListPane.java
  2. 6
      designer-realize/src/main/java/com/fr/grid/selection/FloatSelection.java
  3. 7
      designer-realize/src/main/java/com/fr/quickeditor/floatquick/FloatStringQuickEditor.java

5
designer-base/src/main/java/com/fr/design/file/HistoryTemplateListPane.java

@ -246,8 +246,9 @@ public class HistoryTemplateListPane extends JPanel implements FileOperations, C
*/ */
public int contains(String filename) { public int contains(String filename) {
for (int i = 0; i < historyList.size(); i++) { for (int i = 0; i < historyList.size(); i++) {
String historyPath = historyList.get(i).getPath(); String historyPath = historyList.get(i).getPath().replaceAll("/", "\\\\");
if (ComparatorUtils.equals(historyPath, filename)) { //文件路径是全路径,历史路径是reportlets/模板名
if (filename.endsWith(historyPath)) {
return i; return i;
} }
} }

6
designer-realize/src/main/java/com/fr/grid/selection/FloatSelection.java

@ -235,7 +235,11 @@ public class FloatSelection extends Selection {
public QuickEditor getQuickEditor(TargetComponent tc) { public QuickEditor getQuickEditor(TargetComponent tc) {
ElementCasePane ePane = (ElementCasePane) tc; ElementCasePane ePane = (ElementCasePane) tc;
FloatElement selectedFloat = ePane.getEditingElementCase().getFloatElement(selectedFloatName); FloatElement selectedFloat = ePane.getEditingElementCase().getFloatElement(selectedFloatName);
Object value = selectedFloat.getValue(); Object value = null;
//处理撤销时npe
if(selectedFloat != null) {
value = selectedFloat.getValue();
}
value = value == null ? "" : value; value = value == null ? "" : value;
value = value instanceof Number ? value.toString() : value; value = value instanceof Number ? value.toString() : value;
QuickEditor editor = ActionFactory.getFloatEditor(value.getClass()); QuickEditor editor = ActionFactory.getFloatEditor(value.getClass());

7
designer-realize/src/main/java/com/fr/quickeditor/floatquick/FloatStringQuickEditor.java

@ -90,7 +90,12 @@ public class FloatStringQuickEditor extends FloatQuickEditor {
@Override @Override
protected void refreshDetails() { protected void refreshDetails() {
String str; String str;
Object value = floatElement.getValue(); Object value = null;
//处理撤销时npe
if (floatElement != null){
value = floatElement.getValue();
}
if (value == null) { if (value == null) {
str = StringUtils.EMPTY; str = StringUtils.EMPTY;
} else if (value instanceof BaseFormula) { } else if (value instanceof BaseFormula) {

Loading…
Cancel
Save