mySketchItem = popup->insertItem(tr("MSG_SKETCH_LINK"), this, SLOT(sketchLink()));
popup->insertSeparator();
}
- if (port->IsInLine()) {
+ //for Loop Node: enable "Delete" popup item only for the input port
+ if ( ( port->IsInLine()
+ &&
+ ( port->Node()->Kind()!=SUPERV::EndLoopNode )
+ &&
+ !( port->Node()->Kind()==SUPERV::LoopNode && !port->IsInput() )
+ )
+ ||
+ ( port->IsEndSwitch() && port->IsInput())) {
myDelItem = popup->insertItem(tr("ITM_DEL_PORT"), this, SLOT(deletePort()));
}
connect(this, SIGNAL(MousePress(QMouseEvent*)), this, SLOT(showPopup(QMouseEvent*)));
void SUPERVGUI_PortOut::toStudy() {
Trace("SUPERVGUI_PortOut::toStudy")
- if (!main->isFromStudy()) {
- if (main->addStudy()) main->setAsFromStudy(true);
- }
- if (!main->getStudy()->getStudyDocument()->GetProperties()->IsLocked()) study = !study;
+
+ if (main->getStudy()->getStudyDocument()->GetProperties()->IsLocked()) {
+ QMessageBox::warning(QAD_Application::getDesktop(), tr("WRN_WARNING"), tr("WRN_STUDY_LOCKED"));
+ return;
+ }
+
+ if (!main->isFromStudy()) {
+ if (main->addStudy()) main->setAsFromStudy(true);
+ }
+ study = !study;
sync();
}
-//***********************************************************
+// ----------------------------
// Input Port of EndSwitch Node
// ----------------------------
SUPERVGUI_PortInESNode::SUPERVGUI_PortInESNode(QWidget* parent, SUPERVGUI_Main* m, SUPERV_Port p)
bool editing = port->IsInput() && ( !port->IsLinked() ); //main->isEditable();
if ((!port->IsGate()) && editing ) {
- psc = popup->insertItem(tr("MSG_SETVALUE"), this, SLOT(setInput()));
+ psc = popup->insertItem(tr("MSG_SETVALUE"),this, SLOT(setInput()));
}
- browser = popup->insertItem(tr("MSG_BROWSE"), this, SLOT(browse()));
+ browser = popup->insertItem(tr("MSG_BROWSE"),this, SLOT(browse()));
}
SUPERVGUI_PortInESNode::~SUPERVGUI_PortInESNode() {