]> SALOME platform Git repositories - modules/superv.git/blobdiff - src/SUPERVGUI/SUPERVGUI_Port.cxx
Salome HOME
NRI : Merge from 1.2c.
[modules/superv.git] / src / SUPERVGUI / SUPERVGUI_Port.cxx
index 842687eaa551826aac48cfed38a9980b01bb43f2..335d05063864f6cd5d7e766bc273024b5be38768 100644 (file)
@@ -200,7 +200,7 @@ void SUPERVGUI_PortIn::sync() {
 
 void SUPERVGUI_PortIn::setValue(const char* d) {
     Trace("SUPERVGUI_PortIn::setValue")
-    if (port->Input((*Supervision.getEngine())->StringValue(d))) {
+    if (port->Input(Supervision.getEngine()->StringValue(d))) {
         sync();
     } else {
         QMessageBox::warning(QAD_Application::getDesktop(), tr("ERROR"), tr("MSG_CANT_SETVAL"));
@@ -237,10 +237,11 @@ void SUPERVGUI_PortIn::browse() {
 QPoint SUPERVGUI_PortIn::getConnectPnt() {
   // Parent widget is internal node frame
   // parent of parent is node it self
-  QWidget* aNode = parentWidget()->parentWidget();
+  QWidget* aNode = parentWidget()->parentWidget()->parentWidget();
   QPoint aPnt(aNode->pos()); // position of the node
 
   if (parentWidget()->isVisible()) {
+    aPnt += parentWidget()->parentWidget()->pos();
     aPnt += parentWidget()->pos();
     return QPoint(aPnt.x() + pos().x(), 
                  aPnt.y() + (pos().y() + height()/2));
@@ -355,9 +356,10 @@ void SUPERVGUI_PortOut::browse() {
 QPoint SUPERVGUI_PortOut::getConnectPnt() {
   // Parent widget is internal node frame
   // parent of parent is node it self
-  QWidget* aNode = parentWidget()->parentWidget();
+  QWidget* aNode = parentWidget()->parentWidget()->parentWidget();
   QPoint aPnt(aNode->pos()); // position of the node
   if (parentWidget()->isVisible()) {
+    aPnt += parentWidget()->parentWidget()->pos();
     aPnt += parentWidget()->pos();
     return QPoint(aPnt.x() + pos().x() + width(), 
                  aPnt.y() + (pos().y() + height()/2));
@@ -436,7 +438,7 @@ void SUPERVGUI_PortInESNode::sync() {
 
 void SUPERVGUI_PortInESNode::setValue(const char* d) {
     Trace("SUPERVGUI_PortIn::setValue")
-    if (port->Input((*Supervision.getEngine())->StringValue(d))) {
+    if (port->Input(Supervision.getEngine()->StringValue(d))) {
         sync();
     } else {
         QMessageBox::warning(QAD_Application::getDesktop(), tr("ERROR"), tr("MSG_CANT_SETVAL"));
@@ -447,10 +449,11 @@ void SUPERVGUI_PortInESNode::setValue(const char* d) {
  * Returns coordinates of connection point in content coordinates
  */
 QPoint SUPERVGUI_PortInESNode::getConnectPnt() {
-  QWidget* aNode = parentWidget()->parentWidget();
+  QWidget* aNode = parentWidget()->parentWidget()->parentWidget();
   QPoint aPnt(aNode->pos());
 
   if (parentWidget()->isVisible()) {
+    aPnt += parentWidget()->parentWidget()->pos();
     aPnt += parentWidget()->pos();
     return QPoint(aPnt.x() + pos().x(), 
                  aPnt.y() + (pos().y() + height()/2));