void SUPERVGUI_Clipboard::pasteNode() {
Trace("SUPERVGUI_Main::pasteNode");
SUPERV::CNode_var aNode = getCopyNode();
- if ( !CORBA::is_nil( aNode ) ) {
+ SUPERVGUI_Main* aMain = Supervision.getMain();
+ if ( !CORBA::is_nil( aNode ) && aMain ) {
- SUPERV::Graph_var dataflow = Supervision.getMain()->getDataflow();
+ aMain->Editing(); // PAL6170: GUI->Engine: setting "Editing" flag, why here? -> PAL7960
+
+ SUPERV::Graph_var dataflow = aMain->getDataflow();
switch ( aNode->Kind() ) {
void SUPERVGUI_Clipboard::pastePort( SUPERVGUI_CanvasNode* node )
{
SUPERV::Port_var aPort = getCopyPort();
- if ( !CORBA::is_nil(aPort) ) {
+ SUPERVGUI_Main* aMain = Supervision.getMain();
+ if ( !CORBA::is_nil(aPort) && aMain ) {
+
+ aMain->Editing(); // PAL6170: GUI->Engine: setting "Editing" flag, why here? -> PAL7960
+
SUPERV::INode_var aNode = node->getInlineNode();
if (!CORBA::is_nil(aNode)) {
QString aName = aPort->Name();
Trace("SUPERVGUI_Main::insertFile");
if ((SUPERV_isNull(dataflow))) return;
- Editing(); // PAL6170: GUI->Engine: setting "Editing" flag
-
QString f = QAD_FileDlg::getFileName(QAD_Application::getDesktop(),
"",
"*.xml",
tr("MSG_GRAPH_INSERT"),
true);
- if (!f.isEmpty()) {
+ if ( !f.isEmpty() ) { // not Cancel, but "OK" was pressed with valid file name
+
+ Editing(); // PAL6170: GUI->Engine: setting "Editing" flag, why here? -> see 7960
+
if (dataflow->Import(f.latin1())) {
if (myCurrentView == CANVASTABLE) {
myArray->destroy();
kill();
}
- Editing(); // PAL6170: GUI->Engine: setting "Editing" flag
-
+ //Editing(); // PAL6170: GUI->Engine: setting "Editing" flag, commented: PAL7960
Supervision.getBrowser()->choose();
}
* PS theEndNode is passed only for Loop and Switch nodes (EndLoop and EndSwitch)
*/
void SUPERVGUI_Service::addNode( SUPERV::CNode_var theNode, SUPERV::INode_var theEndNode, int& theX, int& theY ) {
- if ( !CORBA::is_nil( theNode ) ) {
+ SUPERVGUI_Main* aMain = Supervision.getMain();
+
+ if ( !CORBA::is_nil( theNode ) && aMain ) {
+
+ aMain->Editing(); // PAL6170: GUI->Engine: setting "Editing" flag, why here? -> PAL7960
+
int cx, cy; //to appear a new node in the top-left corner of the current viewport
- SUPERVGUI_Main* aMain = Supervision.getMain();
//2.8 point of improvements: Adding node to graph window with taking into account zoom factor
QWMatrix aWM = aMain->getCanvasView()->worldMatrix();