Browse Source

REPORT-9845 & REPORT-9849 & REPORT-9883

master
Mata.Li 6 years ago
parent
commit
bdceb6abab
  1. 6
      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

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

@ -22,6 +22,7 @@ import com.fr.general.Inter;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.Constants;
import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import com.fr.stable.project.ProjectConstants;
import com.fr.workspace.WorkContext;
@ -246,8 +247,9 @@ public class HistoryTemplateListPane extends JPanel implements FileOperations, C
*/
public int contains(String filename) {
for (int i = 0; i < historyList.size(); i++) {
String historyPath = historyList.get(i).getPath();
if (ComparatorUtils.equals(historyPath, filename)) {
String historyPath = historyList.get(i).getPath().replaceAll("/", "\\\\");
//文件路径是全路径,历史路径是reportlets/模板名
if (filename.endsWith(historyPath)) {
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) {
ElementCasePane ePane = (ElementCasePane) tc;
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 instanceof Number ? value.toString() : value;
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
protected void refreshDetails() {
String str;
Object value = floatElement.getValue();
Object value = null;
//处理撤销时npe
if (floatElement != null){
value = floatElement.getValue();
}
if (value == null) {
str = StringUtils.EMPTY;
} else if (value instanceof BaseFormula) {

Loading…
Cancel
Save