Skip to content

Commit

Permalink
Disable the renaming feature until its fixed completely
Browse files Browse the repository at this point in the history
  • Loading branch information
adeas31 committed Jun 1, 2018
1 parent 9d25b38 commit 50fc6a2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
4 changes: 1 addition & 3 deletions OMEdit/OMEditGUI/Component/Component.cpp
Expand Up @@ -2321,9 +2321,7 @@ void Component::componentNameHasChanged()
if (mpLibraryTreeItem && mpLibraryTreeItem->getLibraryType() == LibraryTreeItem::OMS) {
mpLibraryTreeItem->setName(mpComponentInfo->getName());
MainWindow::instance()->getLibraryWidget()->getLibraryTreeModel()->updateLibraryTreeItem(mpLibraryTreeItem);
if (mpDefaultComponentText) {
mpDefaultComponentText->setTextString(mpComponentInfo->getName());
}
emit displayTextChanged();
} else {
displayTextChangedRecursive();
}
Expand Down
1 change: 1 addition & 0 deletions OMEdit/OMEditGUI/Component/FMUProperties.cpp
Expand Up @@ -62,6 +62,7 @@ FMUPropertiesDialog::FMUPropertiesDialog(Component *pComponent, QWidget *pParent
// Create the name label and text box
mpNameLabel = new Label(Helper::name);
mpNameTextBox = new QLineEdit(mpComponent->getName());
mpNameTextBox->setDisabled(true);
// FMU Info
const oms_fmu_info_t *pFMUInfo = mpComponent->getLibraryTreeItem()->getFMUInfo();
mpGeneralGroupBox = new QGroupBox(Helper::general);
Expand Down
1 change: 0 additions & 1 deletion OMEdit/OMEditGUI/MainWindow.cpp
Expand Up @@ -613,7 +613,6 @@ void MainWindow::openDroppedFile(QDropEvent *event)
showProgressBar();
//retrieves the filenames of all the dragged files in list and opens the valid files.
foreach (QUrl fileUrl, event->mimeData()->urls()) {
qDebug() << fileUrl.toLocalFile() << fileUrl.toDisplayString();
QFileInfo fileInfo(fileUrl.toLocalFile());
// show file loading message
mpStatusBar->showMessage(QString(Helper::loading).append(": ").append(fileInfo.absoluteFilePath()));
Expand Down
16 changes: 8 additions & 8 deletions OMEdit/OMEditGUI/Modeling/Commands.cpp
Expand Up @@ -1950,10 +1950,10 @@ FMUPropertiesCommand::FMUPropertiesCommand(Component *pComponent, QString oldNam
void FMUPropertiesCommand::redo()
{
// Rename
if (OMSProxy::instance()->rename(mOldName, mNewName)) {
mpComponent->getComponentInfo()->setName(mNewName.split('.').last());
mpComponent->componentNameHasChanged();
}
// if (OMSProxy::instance()->rename(mOldName, mNewName)) {
// mpComponent->getComponentInfo()->setName(mNewName.split('.').last());
// mpComponent->componentNameHasChanged();
// }
// Parameters
int index = 0;
if (mpComponent->getLibraryTreeItem()->getOMSElement()) {
Expand Down Expand Up @@ -1989,10 +1989,10 @@ void FMUPropertiesCommand::redo()
void FMUPropertiesCommand::undo()
{
// Rename
if (OMSProxy::instance()->rename(mNewName, mOldName)) {
mpComponent->getComponentInfo()->setName(mOldName.split('.').last());
mpComponent->componentNameHasChanged();
}
// if (OMSProxy::instance()->rename(mNewName, mOldName)) {
// mpComponent->getComponentInfo()->setName(mOldName.split('.').last());
// mpComponent->componentNameHasChanged();
// }
// Parameters
int index = 0;
if (mpComponent->getLibraryTreeItem()->getOMSElement()) {
Expand Down

0 comments on commit 50fc6a2

Please sign in to comment.