zhanghaijun 2 年之前
父节点
当前提交
aca7ccba78
共有 3 个文件被更改,包括 195261 次插入 和 3 次删除
  1. 二进制
      project/示例/1.png
  2. 195256 0
      project/示例/参照.dxf
  3. 5 3
      scripts/Data/GroundDataImport/DXFImport/DXFImport.js

二进制
project/示例/1.png


文件差异内容过多而无法显示
+ 195256 - 0
project/示例/参照.dxf


+ 5 - 3
scripts/Data/GroundDataImport/DXFImport/DXFImport.js

@@ -55,7 +55,7 @@ DXFImport.prototype = new Paste();
 DXFImport.includeBasePath = includeBasePath;
 
 DXFImport.prototype.beginEvent = function () {
-  Paste.prototype.beginEvent.call(this);
+  // Paste.prototype.beginEvent.call(this);
 
   var fileDialogInfo;
   if (!isNull(this.fileName)) {
@@ -79,10 +79,12 @@ DXFImport.prototype.beginEvent = function () {
     this.terminate();
     return;
   }
-  EAction.handleUserWarning("==");
   // var ok = this.readTxt(fileDialogInfo[0]);
   try {
-    var file = this.sourceDi.importFile(fileDialogInfo[0], fileDialogInfo[1], false);
+    var di = this.getDocumentInterface(); // getAssignDocumentInterface(1);
+    var file = di.importFile(fileDialogInfo[0], fileDialogInfo[1], false);
+    di.regenerateScenes();
+    di.autoZoom();
     if (file !== RDocumentInterface.IoErrorNoError) {
       EAction.handleUserWarning(qsTr("Error while importing file %1").arg(fileDialogInfo[0]));
       if (!isNull(this.sourceDi)) {