提交 dacbe4ec 编写于 作者: S Serge Rider

Reset content viewer on value read error

上级 656adc4a
......@@ -131,6 +131,15 @@ public class ContentPanelEditor extends BaseValueEditor<Control> implements IVal
}
} catch (Exception e) {
log.error(e);
// Clear contents
if (control instanceof Text) {
((Text) control).setText("");
} else if (control instanceof HexEditControl) {
((HexEditControl) control).setContent(new byte[0]);
} else if (control instanceof ImageViewer) {
((ImageViewer) control).clearImage();
}
// Show error
valueController.showMessage(e.getMessage(), true);
} finally {
monitor.done();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册