// Author : Natalia KOPNOVA
// Module : SUPERV
-using namespace std;
#include "SUPERVGUI_CanvasNodePrs.h"
#include "SUPERVGUI_CanvasNode.h"
#include "SUPERVGUI_CanvasPort.h"
#include "SUPERVGUI_Canvas.h"
#include "SUPERVGUI_CanvasCellNodePrs.h"
+#include "SUPERVGUI_Main.h"
#include "SUIT_ResourceMgr.h"
#include <sys/timeb.h>
#endif
-#define PORT_MARGIN 2
+//#define PORT_MARGIN 2
#undef PORT_HEIGHT // to avoid warning message
#define PORT_HEIGHT LABEL_HEIGHT
#define TEXT_MARGIN 5
{
thePainter.setPen(pen());
thePainter.setBrush(nodeColor());
- drawShape(thePainter);
+ if ( !CORBA::is_nil( myNode->getMain()->getDataflow()->Node( myNode->name() ) ) ) // mkr : IPAL11360
+ drawShape(thePainter);
}
void SUPERVGUI_CanvasNodePrs::drawShape(QPainter& thePainter)
++it;
if (obj->inherits("SUPERVGUI_CanvasPort")) {
aPort = (SUPERVGUI_CanvasPort*) obj;
- if (!aPort->getEngine()->IsGate()) {
+
+ SUPERV_Port aPortEng = aPort->getEngine();
+ // if ( CORBA::is_nil( aPortEng ) )
+ // printf ( "---\n port engine IS NIL ---\n\n" );
+
+ if ( !CORBA::is_nil( aPortEng ) && !aPortEng->IsGate() ) {
aPort->getPrs()->draw(thePainter);
}
}
QString SUPERVGUI_CanvasPortPrs::getText() const
{
SUPERV_Port aPort = myPort->getEngine();
- QString aText = aPort->Name();
- if (aPort->IsParam() || aPort->IsInLine() || myPort->isStream())
- aText = aText + "=" + aPort->ToString();
+ QString aText;
+ if ( !CORBA::is_nil( aPort ) ) {
+ aText = aPort->Name();
+ if (aPort->IsParam() || aPort->IsInLine() || myPort->isStream())
+ aText = aText + "=" + aPort->ToString();
+ }
+ // printf( "--- return text of port : %s ---\n", aText.latin1() );
return aText;
}