Skip to content

Commit

Permalink
- Fixed connect equation indexing problem (thanks to Henning Kiel).
Browse files Browse the repository at this point in the history
- Properly check annotations before creating a redbox.

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@11752 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adeas31 committed Apr 13, 2012
1 parent 4c880a2 commit 008244d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 6 additions & 7 deletions OMEdit/OMEditGUI/Component.cpp
Expand Up @@ -756,21 +756,20 @@ bool Component::canDrawRedBox(Component *pComponent)
draw = true;
else
return false;

foreach (Component *pChildComponent, mpComponentsList)
// check components list
foreach (Component *pChildComponent, pComponent->mpComponentsList)
{
draw = canDrawRedBox(pChildComponent);
if (!draw)
break;
return draw; // return whenever we get false
}

foreach (Component *pInheritedComponent, mpInheritanceList)
// check inherited components list
foreach (Component *pInheritedComponent, pComponent->mpInheritanceList)
{
draw = canDrawRedBox(pInheritedComponent);
if (!draw)
break;
return draw; // return whenever we get false
}

return draw;
}

Expand Down
2 changes: 2 additions & 0 deletions OMEdit/OMEditGUI/ConnectorWidget.cpp
Expand Up @@ -93,6 +93,8 @@ Connector::Connector(Component *pStartPort, Component *pEndPort, GraphicsView *p
}

mEndComponentConnected = true;
mStartConnectorIsArray = false;
mEndConnectorIsArray = false;
emit endComponentConnected();
setPassive();
if (mpEndComponent->mpParentComponent)
Expand Down

0 comments on commit 008244d

Please sign in to comment.