| 53 QString errorString; |
53 QString errorString; |
| 54 QTextStream errorStream{&errorString}; |
54 QTextStream errorStream{&errorString}; |
| 55 QString modelName = this->documents.openModel(path, errorStream); |
55 QString modelName = this->documents.openModel(path, errorStream); |
| 56 if (not modelName.isEmpty()) |
56 if (not modelName.isEmpty()) |
| 57 { |
57 { |
| |
58 this->documents.loadDependenciesForModel(modelName, this->libraries, errorStream); |
| |
59 if (not errorString.isEmpty()) |
| |
60 { |
| |
61 QMessageBox::warning( |
| |
62 this, |
| |
63 tr("Problem loading references"), |
| |
64 errorString); |
| |
65 } |
| 58 this->openModelForEditing(modelName); |
66 this->openModelForEditing(modelName); |
| 59 this->addRecentlyOpenedFile(path); |
67 this->addRecentlyOpenedFile(path); |
| 60 } |
68 } |
| 61 else |
69 else |
| 62 { |
70 { |