Skip to content

Commit 11f71a3

Browse files
committed
Allow adding table as submodel
FMU properties context menu
1 parent ce21b10 commit 11f71a3

File tree

16 files changed

+116
-62
lines changed

16 files changed

+116
-62
lines changed

OMEdit/OMEditGUI/Annotations/ShapeAnnotation.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1696,7 +1696,8 @@ void ShapeAnnotation::contextMenuEvent(QGraphicsSceneContextMenuEvent *pEvent)
16961696
} else if (mpGraphicsView->getModelWidget()->getLibraryTreeItem()->getLibraryType()== LibraryTreeItem::OMS) {
16971697
BitmapAnnotation *pBitmapAnnotation = dynamic_cast<BitmapAnnotation*>(this);
16981698
if (pBitmapAnnotation && mpGraphicsView->getModelWidget()->getLibraryTreeItem()->getOMSElement()
1699-
&& mpGraphicsView->getModelWidget()->getLibraryTreeItem()->getOMSElement()->type == oms_component_fmu) {
1699+
&& (mpGraphicsView->getModelWidget()->getLibraryTreeItem()->getOMSElement()->type == oms_component_fmu
1700+
|| mpGraphicsView->getModelWidget()->getLibraryTreeItem()->getOMSElement()->type == oms_component_table)) {
17001701
menu.addAction(mpDeleteSubModelIconAction);
17011702
} else {
17021703
return;

OMEdit/OMEditGUI/Component/Component.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1699,6 +1699,10 @@ void Component::createActions()
16991699
mpSubModelAttributesAction = new QAction(Helper::attributes, mpGraphicsView);
17001700
mpSubModelAttributesAction->setStatusTip(tr("Shows the submodel attributes"));
17011701
connect(mpSubModelAttributesAction, SIGNAL(triggered()), SLOT(showSubModelAttributes()));
1702+
// FMU Properties Action
1703+
mpFMUPropertiesAction = new QAction(Helper::fmuProperties, mpGraphicsView);
1704+
mpFMUPropertiesAction->setStatusTip(tr("Shows the FMU Properties dialog"));
1705+
connect(mpFMUPropertiesAction, SIGNAL(triggered()), SLOT(showFMUPropertiesDialog()));
17021706
}
17031707

17041708
void Component::createResizerItems()
@@ -2761,6 +2765,9 @@ void Component::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
27612765
menu.addAction(pComponent->getSubModelAttributesAction());
27622766
break;
27632767
case LibraryTreeItem::OMS:
2768+
if (pComponent->getLibraryTreeItem()->getOMSElement() && pComponent->getLibraryTreeItem()->getOMSElement()->type == oms_component_fmu) {
2769+
menu.addAction(pComponent->getFMUPropertiesAction());
2770+
}
27642771
break;
27652772
}
27662773
menu.addSeparator();

OMEdit/OMEditGUI/Component/Component.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ class Component : public QObject, public QGraphicsItem
205205
QAction* getOpenClassAction() {return mpOpenClassAction;}
206206
QAction* getViewDocumentationAction() {return mpViewDocumentationAction;}
207207
QAction* getSubModelAttributesAction() {return mpSubModelAttributesAction;}
208+
QAction* getFMUPropertiesAction() {return mpFMUPropertiesAction;}
208209
ComponentInfo* getComponentInfo() {return mpComponentInfo;}
209210
QList<ShapeAnnotation*> getShapesList() {return mShapesList;}
210211
QList<Component*> getInheritedComponentsList() {return mInheritedComponentsList;}
@@ -269,6 +270,7 @@ class Component : public QObject, public QGraphicsItem
269270
QAction *mpOpenClassAction;
270271
QAction *mpViewDocumentationAction;
271272
QAction *mpSubModelAttributesAction;
273+
QAction *mpFMUPropertiesAction;
272274
ResizerItem *mpBottomLeftResizerItem;
273275
ResizerItem *mpTopLeftResizerItem;
274276
ResizerItem *mpTopRightResizerItem;

OMEdit/OMEditGUI/Component/FMUProperties.cpp

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ FMUProperties::FMUProperties()
5353
FMUPropertiesDialog::FMUPropertiesDialog(Component *pComponent, QWidget *pParent)
5454
: QDialog(pParent)
5555
{
56-
setWindowTitle(QString(Helper::applicationName).append(" - ").append(tr("FMU Properties")));
56+
setWindowTitle(QString(Helper::applicationName).append(" - ").append(Helper::fmuProperties));
5757
setAttribute(Qt::WA_DeleteOnClose);
5858
mpComponent = pComponent;
5959
// heading
60-
mpHeading = Utilities::getHeadingLabel(tr("FMU Properties"));
60+
mpHeading = Utilities::getHeadingLabel(Helper::fmuProperties);
6161
// horizontal line
6262
mpHorizontalLine = Utilities::getHeadingLine();
6363
// Create the name label and text box
@@ -143,10 +143,12 @@ FMUPropertiesDialog::FMUPropertiesDialog(Component *pComponent, QWidget *pParent
143143
pParametersScrollArea->setWidget(pParametersGroupBox);
144144
mParameterLabels.clear();
145145
mParameterLineEdits.clear();
146-
if (mpComponent->getLibraryTreeItem()->getOMSElement()) {
146+
if (mpComponent->getLibraryTreeItem()->getOMSElement() && mpComponent->getLibraryTreeItem()->getOMSElement()->connectors) {
147+
bool hasParameter = false;
147148
oms_connector_t** pInterfaces = mpComponent->getLibraryTreeItem()->getOMSElement()->connectors;
148149
for (int i = 0 ; pInterfaces[i] ; i++) {
149150
if (pInterfaces[i]->causality == oms_causality_parameter) {
151+
hasParameter = true;
150152
QString name = QString(pInterfaces[i]->name).split(':', QString::SkipEmptyParts).last();
151153
Label *pNameLabel = new Label(name);
152154
pNameLabel->setToolTip(pInterfaces[i]->name);
@@ -194,6 +196,9 @@ FMUPropertiesDialog::FMUPropertiesDialog(Component *pComponent, QWidget *pParent
194196
pParametersGridLayout->addWidget(mParameterLineEdits.last(), layoutIndex, columnIndex++);
195197
}
196198
}
199+
if (!hasParameter) {
200+
pParametersScrollArea->setVisible(false);
201+
}
197202
}
198203
// FMU Inputs
199204
QGridLayout *pInputsGridLayout = new QGridLayout;
@@ -206,10 +211,12 @@ FMUPropertiesDialog::FMUPropertiesDialog(Component *pComponent, QWidget *pParent
206211
pInputsScrollArea->setWidget(pInputsGroupBox);
207212
mInputLabels.clear();
208213
mInputLineEdits.clear();
209-
if (mpComponent->getLibraryTreeItem()->getOMSElement()) {
214+
if (mpComponent->getLibraryTreeItem()->getOMSElement() && mpComponent->getLibraryTreeItem()->getOMSElement()->connectors) {
215+
bool hasInput = false;
210216
oms_connector_t** pInterfaces = mpComponent->getLibraryTreeItem()->getOMSElement()->connectors;
211217
for (int i = 0 ; pInterfaces[i] ; i++) {
212218
if (pInterfaces[i]->causality == oms_causality_input) {
219+
hasInput = true;
213220
QString name = QString(pInterfaces[i]->name).split(':', QString::SkipEmptyParts).last();
214221
Label *pNameLabel = new Label(name);
215222
pNameLabel->setToolTip(pInterfaces[i]->name);
@@ -257,6 +264,9 @@ FMUPropertiesDialog::FMUPropertiesDialog(Component *pComponent, QWidget *pParent
257264
pInputsGridLayout->addWidget(mInputLineEdits.last(), layoutIndex, columnIndex++);
258265
}
259266
}
267+
if (!hasInput) {
268+
pInputsScrollArea->setVisible(false);
269+
}
260270
}
261271
// Create the buttons
262272
mpOkButton = new QPushButton(Helper::ok);

OMEdit/OMEditGUI/MainWindow.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3372,9 +3372,9 @@ void MainWindow::createActions()
33723372
mpTLMCoSimulationAction->setStatusTip(Helper::tlmCoSimulationSetupTip);
33733373
mpTLMCoSimulationAction->setEnabled(false);
33743374
connect(mpTLMCoSimulationAction, SIGNAL(triggered()), SLOT(TLMSimulate()));
3375-
// Add FMU Action
3376-
mpAddFMUAction = new QAction(QIcon(":/Resources/icons/import-fmu.svg"), Helper::addFMU, this);
3377-
mpAddFMUAction->setStatusTip(Helper::addFMUTip);
3375+
// Add SubModel Action
3376+
mpAddSubModelAction = new QAction(QIcon(":/Resources/icons/import-fmu.svg"), Helper::addSubModel, this);
3377+
mpAddSubModelAction->setStatusTip(Helper::addSubModelTip);
33783378
// Add or Edit submodel icon Action
33793379
mpAddOrEditSubModelIconAction = new QAction(QIcon(":/Resources/icons/bitmap-shape.svg"), tr("Add/Edit SubModel Icon"), this);
33803380
mpAddOrEditSubModelIconAction->setStatusTip(tr("Adds/Edits an icon for submodel"));
@@ -4023,7 +4023,7 @@ void MainWindow::createToolbars()
40234023
mpOMSimulatorToobar->setObjectName("OMSimulator Toolbar");
40244024
mpOMSimulatorToobar->setAllowedAreas(Qt::TopToolBarArea);
40254025
// add actions to OMSimulator Toolbar
4026-
mpOMSimulatorToobar->addAction(mpAddFMUAction);
4026+
mpOMSimulatorToobar->addAction(mpAddSubModelAction);
40274027
mpOMSimulatorToobar->addAction(mpAddOrEditSubModelIconAction);
40284028
mpOMSimulatorToobar->addSeparator();
40294029
mpOMSimulatorToobar->addAction(mpOMSSimulationSetupAction);

OMEdit/OMEditGUI/MainWindow.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ class MainWindow : public QMainWindow
184184
QAction* getFetchInterfaceDataAction() {return mpFetchInterfaceDataAction;}
185185
QAction* getAlignInterfacesAction() {return mpAlignInterfacesAction;}
186186
QAction* getTLMSimulationAction() {return mpTLMCoSimulationAction;}
187-
QAction* getAddFMUAction() {return mpAddFMUAction;}
187+
QAction* getAddSubModelAction() {return mpAddSubModelAction;}
188188
QAction* getAddOrEditSubModelIconAction() {return mpAddOrEditSubModelIconAction;}
189189
QAction* getOMSSimulationSetupAction() {return mpOMSSimulationSetupAction;}
190190
QAction* getLogCurrentFileAction() {return mpLogCurrentFileAction;}
@@ -398,7 +398,7 @@ class MainWindow : public QMainWindow
398398
QAction *mpAlignInterfacesAction;
399399
QAction *mpTLMCoSimulationAction;
400400
// OMSimulator Actions
401-
QAction *mpAddFMUAction;
401+
QAction *mpAddSubModelAction;
402402
QAction *mpAddOrEditSubModelIconAction;
403403
QAction *mpOMSSimulationSetupAction;
404404
// Toolbars

OMEdit/OMEditGUI/Modeling/Commands.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1815,7 +1815,7 @@ AddSubModelCommand::AddSubModelCommand(QString name, QString path, LibraryTreeIt
18151815
void AddSubModelCommand::redo()
18161816
{
18171817
if (!mOpeningClass) {
1818-
mpGraphicsView->addFMU(mName, mPath);
1818+
mpGraphicsView->addSubModel(mName, mPath);
18191819
}
18201820
if (!mpLibraryTreeItem) {
18211821
// Create a LibraryTreeItem for FMU
@@ -1910,7 +1910,7 @@ void DeleteSubModelCommand::redo()
19101910
void DeleteSubModelCommand::undo()
19111911
{
19121912
// add submodel
1913-
mpGraphicsView->addFMU(mName, mPath);
1913+
mpGraphicsView->addSubModel(mName, mPath);
19141914
// Create a LibraryTreeItem for FMU
19151915
LibraryTreeModel *pLibraryTreeModel = MainWindow::instance()->getLibraryWidget()->getLibraryTreeModel();
19161916
LibraryTreeItem *pParentLibraryTreeItem = mpGraphicsView->getModelWidget()->getLibraryTreeItem();
@@ -1957,7 +1957,7 @@ void FMUPropertiesCommand::redo()
19571957
// Parameters
19581958
int parametersIndex = 0;
19591959
int inputsIndex = 0;
1960-
if (mpComponent->getLibraryTreeItem()->getOMSElement()) {
1960+
if (mpComponent->getLibraryTreeItem()->getOMSElement() && mpComponent->getLibraryTreeItem()->getOMSElement()->connectors) {
19611961
oms_connector_t** pInterfaces = mpComponent->getLibraryTreeItem()->getOMSElement()->connectors;
19621962
for (int i = 0 ; pInterfaces[i] ; i++) {
19631963
if (pInterfaces[i]->causality == oms_causality_parameter) {
@@ -2015,7 +2015,7 @@ void FMUPropertiesCommand::undo()
20152015
// Parameters
20162016
int parametersIndex = 0;
20172017
int inputsIndex = 0;
2018-
if (mpComponent->getLibraryTreeItem()->getOMSElement()) {
2018+
if (mpComponent->getLibraryTreeItem()->getOMSElement() && mpComponent->getLibraryTreeItem()->getOMSElement()->connectors) {
20192019
oms_connector_t** pInterfaces = mpComponent->getLibraryTreeItem()->getOMSElement()->connectors;
20202020
for (int i = 0 ; pInterfaces[i] ; i++) {
20212021
if (pInterfaces[i]->causality == oms_causality_parameter) {

OMEdit/OMEditGUI/Modeling/LibraryTreeWidget.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,11 @@ QString LibraryTreeItem::getTooltip() const {
584584
.arg(QObject::tr("FMU Kind")).arg(OMSProxy::getFMUKindString(mpFMUInfo->fmiKind))
585585
.arg(QObject::tr("FMI Version")).arg(QString(mpFMUInfo->fmiVersion))
586586
.arg(Helper::fileLocation).arg(mFileName);
587+
} else if (mpOMSElement && mpOMSElement->type == oms_component_table) {
588+
tooltip = QString("%1 %2<br />%3: %4<br />%5: %6")
589+
.arg(Helper::name).arg(mName)
590+
.arg(Helper::type).arg(OMSProxy::getElementTypeString(mpOMSElement->type))
591+
.arg(Helper::fileLocation).arg(mFileName);
587592
} else if (mpOMSConnector) {
588593
tooltip = QString("%1 %2<br />%3: %4<br />%5: %6<br />%7: %8")
589594
.arg(Helper::name).arg(mName)
@@ -2640,8 +2645,7 @@ LibraryTreeItem* LibraryTreeModel::createOMSLibraryTreeItemImpl(QString name, QS
26402645
}
26412646
pLibraryTreeItem->setOMSElement(pOMSElement);
26422647
pLibraryTreeItem->setOMSConnector(pOMSConnector);
2643-
if (pParentLibraryTreeItem && pParentLibraryTreeItem->getOMSElement() &&
2644-
pParentLibraryTreeItem->getOMSElement()->type < oms_component_fmu) {
2648+
if (pParentLibraryTreeItem && pLibraryTreeItem->getOMSElement() && pLibraryTreeItem->getOMSElement()->type == oms_component_fmu) {
26452649
const oms_fmu_info_t *pFMUInfo;
26462650
if (OMSProxy::instance()->getFMUInfo(pLibraryTreeItem->getNameStructure(), &pFMUInfo)) {
26472651
pLibraryTreeItem->setFMUInfo(pFMUInfo);
@@ -2670,7 +2674,7 @@ LibraryTreeItem* LibraryTreeModel::createOMSLibraryTreeItemImpl(QString name, QS
26702674
*/
26712675
void LibraryTreeModel::createOMSConnectorLibraryTreeItems(LibraryTreeItem *pLibraryTreeItem)
26722676
{
2673-
if (pLibraryTreeItem->getOMSElement()) {
2677+
if (pLibraryTreeItem->getOMSElement() && pLibraryTreeItem->getOMSElement()->connectors) {
26742678
for (int j = 0 ; pLibraryTreeItem->getOMSElement()->connectors[j] ; j++) {
26752679
QString name = StringHandler::getLastWordAfterDot(pLibraryTreeItem->getOMSElement()->connectors[j]->name);
26762680
name = name.split(':', QString::SkipEmptyParts).last();

OMEdit/OMEditGUI/Modeling/ModelWidgetContainer.cpp

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,16 +1171,20 @@ void GraphicsView::fitInViewInternal()
11711171
}
11721172

11731173
/*!
1174-
* \brief GraphicsView::addFMU
1175-
* Adds the FMU as submodel to the OMS model.
1174+
* \brief GraphicsView::addSubModel
1175+
* Adds the submodel to the OMS model.
11761176
* \param name
11771177
* \param path
11781178
*/
1179-
void GraphicsView::addFMU(QString name, QString path)
1179+
void GraphicsView::addSubModel(QString name, QString path)
11801180
{
11811181
QFileInfo fileInfo(path);
11821182
OMSProxy::instance()->setWorkingDirectory(fileInfo.absoluteDir().absolutePath());
1183-
OMSProxy::instance()->addFMU(mpModelWidget->getLibraryTreeItem()->getNameStructure(), fileInfo.absoluteFilePath(), name);
1183+
if (fileInfo.suffix().compare("fmu") == 0) {
1184+
OMSProxy::instance()->addFMU(mpModelWidget->getLibraryTreeItem()->getNameStructure(), fileInfo.absoluteFilePath(), name);
1185+
} else {
1186+
OMSProxy::instance()->addTable(mpModelWidget->getLibraryTreeItem()->getNameStructure(), fileInfo.absoluteFilePath(), name);
1187+
}
11841188
OMSProxy::instance()->setWorkingDirectory(OptionsDialog::instance()->getOMSimulatorPage()->getWorkingDirectory());
11851189
}
11861190

@@ -1319,7 +1323,8 @@ bool GraphicsView::isAnyItemSelectedAndEditable(int key)
13191323
}
13201324
if (mpModelWidget->getLibraryTreeItem()->getLibraryType() == LibraryTreeItem::OMS) {
13211325
if (mpModelWidget->getLibraryTreeItem()->getOMSElement()
1322-
&& mpModelWidget->getLibraryTreeItem()->getOMSElement()->type == oms_component_fmu) {
1326+
&& (mpModelWidget->getLibraryTreeItem()->getOMSElement()->type == oms_component_fmu
1327+
|| mpModelWidget->getLibraryTreeItem()->getOMSElement()->type == oms_component_table)) {
13231328
switch (key) {
13241329
case Qt::Key_Delete:
13251330
case Qt::Key_R: // rotate
@@ -2627,8 +2632,9 @@ void GraphicsView::contextMenuEvent(QContextMenuEvent *event)
26272632
menu.addSeparator();
26282633
if (mpModelWidget->getLibraryTreeItem()->getOMSElement()) {
26292634
if (mpModelWidget->getLibraryTreeItem()->getOMSElement()->type == oms_component_fmi) {
2630-
menu.addAction(MainWindow::instance()->getAddFMUAction());
2631-
} else if (mpModelWidget->getLibraryTreeItem()->getOMSElement()->type == oms_component_fmu) {
2635+
menu.addAction(MainWindow::instance()->getAddSubModelAction());
2636+
} else if (mpModelWidget->getLibraryTreeItem()->getOMSElement()->type == oms_component_fmu
2637+
|| mpModelWidget->getLibraryTreeItem()->getOMSElement()->type == oms_component_table) {
26322638
menu.addAction(MainWindow::instance()->getAddOrEditSubModelIconAction());
26332639
}
26342640
}
@@ -3003,6 +3009,7 @@ ModelWidget::ModelWidget(LibraryTreeItem* pLibraryTreeItem, ModelWidgetContainer
30033009
}
30043010
mpEditor = 0;
30053011
if ((mpLibraryTreeItem->getOMSElement() && mpLibraryTreeItem->getOMSElement()->type == oms_component_fmu)
3012+
|| (mpLibraryTreeItem->getOMSElement() && mpLibraryTreeItem->getOMSElement()->type == oms_component_table)
30063013
|| mpLibraryTreeItem->getOMSConnector()) {
30073014
drawOMSModelElements();
30083015
}
@@ -5482,7 +5489,7 @@ void ModelWidget::drawOMSModelElements()
54825489
mpUndoStack->push(pAddSubModelCommand);
54835490
}
54845491
}
5485-
} else if (mpLibraryTreeItem->getOMSElement()->type == oms_component_fmu) {
5492+
} else if (mpLibraryTreeItem->getOMSElement()->type == oms_component_fmu || mpLibraryTreeItem->getOMSElement()->type == oms_component_table) {
54865493
if (mpLibraryTreeItem->getOMSElement()->geometry && mpLibraryTreeItem->getOMSElement()->geometry->iconSource) {
54875494
// Draw bitmap with icon source
54885495
QUrl url(mpLibraryTreeItem->getOMSElement()->geometry->iconSource);
@@ -5954,7 +5961,7 @@ ModelWidgetContainer::ModelWidgetContainer(QWidget *pParent)
59545961
connect(MainWindow::instance()->getPrintModelAction(), SIGNAL(triggered()), SLOT(printModel()));
59555962
connect(MainWindow::instance()->getSimulationParamsAction(), SIGNAL(triggered()), SLOT(showSimulationParams()));
59565963
connect(MainWindow::instance()->getAlignInterfacesAction(), SIGNAL(triggered()), SLOT(alignInterfaces()));
5957-
connect(MainWindow::instance()->getAddFMUAction(), SIGNAL(triggered()), SLOT(addFMU()));
5964+
connect(MainWindow::instance()->getAddSubModelAction(), SIGNAL(triggered()), SLOT(addSubModel()));
59585965
connect(MainWindow::instance()->getAddOrEditSubModelIconAction(), SIGNAL(triggered()), SLOT(addOrEditSubModelIcon()));
59595966
}
59605967

@@ -6390,7 +6397,8 @@ void ModelWidgetContainer::currentModelWidgetChanged(QMdiSubWindow *pSubWindow)
63906397
oms = true;
63916398
oms_submodel = false;
63926399
oms_connector = false;
6393-
if (pLibraryTreeItem->getOMSElement() && pLibraryTreeItem->getOMSElement()->type == oms_component_fmu) {
6400+
if (pLibraryTreeItem->getOMSElement() && (pLibraryTreeItem->getOMSElement()->type == oms_component_fmu
6401+
|| pLibraryTreeItem->getOMSElement()->type == oms_component_table)) {
63946402
oms_submodel = true;
63956403
}
63966404
if (pLibraryTreeItem->getOMSConnector()) {
@@ -6451,7 +6459,7 @@ void ModelWidgetContainer::currentModelWidgetChanged(QMdiSubWindow *pSubWindow)
64516459
MainWindow::instance()->getFetchInterfaceDataAction()->setEnabled(enabled && compositeModel);
64526460
MainWindow::instance()->getAlignInterfacesAction()->setEnabled(enabled && compositeModel);
64536461
MainWindow::instance()->getTLMSimulationAction()->setEnabled(enabled && compositeModel);
6454-
MainWindow::instance()->getAddFMUAction()->setEnabled(enabled && (oms && !(oms_submodel || oms_connector)));
6462+
MainWindow::instance()->getAddSubModelAction()->setEnabled(enabled && (oms && !(oms_submodel || oms_connector)));
64556463
MainWindow::instance()->getAddOrEditSubModelIconAction()->setEnabled(enabled && oms_submodel);
64566464
MainWindow::instance()->getOMSSimulationSetupAction()->setEnabled(enabled && (oms && !(oms_submodel || oms_connector)));
64576465
MainWindow::instance()->getLogCurrentFileAction()->setEnabled(enabled && gitWorkingDirectory);
@@ -6624,14 +6632,14 @@ void ModelWidgetContainer::alignInterfaces()
66246632
}
66256633

66266634
/*!
6627-
* \brief ModelWidgetContainer::addFMU
6635+
* \brief ModelWidgetContainer::addSubModel
66286636
* Opens the AddFMUDialog.
66296637
*/
6630-
void ModelWidgetContainer::addFMU()
6638+
void ModelWidgetContainer::addSubModel()
66316639
{
66326640
ModelWidget *pModelWidget = getCurrentModelWidget();
66336641
if (pModelWidget && pModelWidget->getDiagramGraphicsView()) {
6634-
AddFMUDialog *pAddFMUDialog = new AddFMUDialog(pModelWidget->getDiagramGraphicsView());
6642+
AddSubModelDialog *pAddFMUDialog = new AddSubModelDialog(pModelWidget->getDiagramGraphicsView());
66356643
pAddFMUDialog->exec();
66366644
}
66376645
}

OMEdit/OMEditGUI/Modeling/ModelWidgetContainer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ class GraphicsView : public QGraphicsView
245245
void addItem(QGraphicsItem *pGraphicsItem);
246246
void removeItem(QGraphicsItem *pGraphicsItem);
247247
void fitInViewInternal();
248-
void addFMU(QString name, QString path);
248+
void addSubModel(QString name, QString path);
249249
void deleteSubModel(QString name);
250250
private:
251251
void createActions();
@@ -525,7 +525,7 @@ public slots:
525525
void printModel();
526526
void showSimulationParams();
527527
void alignInterfaces();
528-
void addFMU();
528+
void addSubModel();
529529
void addOrEditSubModelIcon();
530530
};
531531

0 commit comments

Comments
 (0)