Skip to content

Commit

Permalink
- Change the view at one place.
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@24906 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adeas31 committed Mar 4, 2015
1 parent 93d2849 commit 9429d8e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion OMEdit/OMEditGUI/Modeling/ModelWidgetContainer.cpp
Expand Up @@ -2043,7 +2043,6 @@ ModelWidget::ModelWidget(LibraryTreeNode* pLibraryTreeNode, ModelWidgetContainer
pMainLayout->addWidget(mpIconGraphicsView, 1);
pMainLayout->addWidget(mpModelicaTextEditor, 1);
} else if (pLibraryTreeNode->getLibraryType() == LibraryTreeNode::Text) {
mpTextViewToolButton->setChecked(true);
pViewButtonsHorizontalLayout->addWidget(mpTextViewToolButton);
// icon graphics framework
mpIconGraphicsScene = 0;
Expand Down Expand Up @@ -2774,6 +2773,11 @@ void ModelWidgetContainer::addModelWidget(ModelWidget *pModelWidget, bool checkP
}
setActiveSubWindow(pSubWindow);
}
if (pModelWidget->getLibraryTreeNode()->getLibraryType() == LibraryTreeNode::Text) {
pModelWidget->getTextViewToolButton()->setChecked(true);
} else if (pModelWidget->getLibraryTreeNode()->getLibraryType() == LibraryTreeNode::TLM) {
pModelWidget->getDiagramViewToolButton()->setChecked(true);
}
if (!checkPreferedView || pModelWidget->getLibraryTreeNode()->getLibraryType() != LibraryTreeNode::Modelica) {
return;
}
Expand Down

0 comments on commit 9429d8e

Please sign in to comment.