1.1 Binary file demos/vym-projectplan.vym has changed
2.1 --- a/mainwindow.cpp Fri Jun 29 09:43:54 2007 +0000
2.2 +++ b/mainwindow.cpp Fri Jun 29 15:12:04 2007 +0000
2.3 @@ -2892,6 +2892,7 @@
2.4 BranchObj *bo=(BranchObj*)me->getSelection();
2.5 BranchObj *newbo=me->addNewBranch(0);
2.6
2.7 + prevSelection=bo->getSelectString();
2.8 if (newbo)
2.9 me->select (newbo->getSelectString());
2.10 else
2.11 @@ -2899,10 +2900,19 @@
2.12
2.13 if (actionSettingsAutoEdit->isOn())
2.14 {
2.15 - if (!actionSettingsAutoSelectHeading->isOn())
2.16 - prevSelection=bo->getSelectString();
2.17 editHeading();
2.18 + return;
2.19 + }
2.20 + /*
2.21 + if (!actionSettingsAutoSelectHeading->isOn())
2.22 + me->select(bo->getSelectString());
2.23 + */
2.24 + if (!prevSelection.isEmpty())
2.25 + {
2.26 + me->select(prevSelection);
2.27 + prevSelection="";
2.28 }
2.29 +
2.30 }
2.31 }
2.32
3.1 --- a/mapeditor.cpp Fri Jun 29 09:43:54 2007 +0000
3.2 +++ b/mapeditor.cpp Fri Jun 29 15:12:04 2007 +0000
3.3 @@ -775,7 +775,10 @@
3.4 // Get number in parent
3.5 x=parser.parInt (ok,1);
3.6 if (ok)
3.7 + {
3.8 selb->linkTo ((BranchObj*)(dst),x);
3.9 + xelection.update();
3.10 + }
3.11 } else if (typeid(*dst) == typeid(MapCenterObj) )
3.12 {
3.13 selb->linkTo ((BranchObj*)(dst),-1);
3.14 @@ -784,7 +787,11 @@
3.15 if (ok)
3.16 {
3.17 y=parser.parInt (ok,3);
3.18 - if (ok) selb->move (x,y);
3.19 + if (ok)
3.20 + {
3.21 + selb->move (x,y);
3.22 + xelection.update();
3.23 + }
3.24 }
3.25 }
3.26 }
3.27 @@ -2450,11 +2457,9 @@
3.28 // so we have to pass on this information via saveState.
3.29 // TODO: Get rid of this positioning workaround
3.30 QString ps=qpointfToString (newbo->getAbsPos());
3.31 - saveState(
3.32 - newbo, "move "+ps,
3.33 - newbo, "move "+ps,
3.34 - QString("Move %1 to %2").arg(getName(newbo)).arg(ps));
3.35 -
3.36 + sendData ("selectLastBranch ()");
3.37 + sendData (QString("move %1").arg(ps));
3.38 + sendSelection();
3.39 xelection.update();
3.40 }
3.41 }
3.42 @@ -4090,7 +4095,6 @@
3.43
3.44 void MapEditor::testFunction1()
3.45 {
3.46 - newServer();
3.47
3.48 /*
3.49 BranchObj *bo=xelection.getBranch();
3.50 @@ -4139,7 +4143,6 @@
3.51
3.52 void MapEditor::testFunction2()
3.53 {
3.54 - sendData("Foo");
3.55 }
3.56
3.57 void MapEditor::contextMenuEvent ( QContextMenuEvent * e )
3.58 @@ -4800,8 +4803,7 @@
3.59 }
3.60 connect(tcpServer, SIGNAL(newConnection()), this, SLOT(newClient()));
3.61 netstate=Server;
3.62 - if (debug)
3.63 - cout<<"Server is running on port "<<tcpServer->serverPort()<<endl;
3.64 + cout<<"Server is running on port "<<tcpServer->serverPort()<<endl;
3.65 }
3.66
3.67 void MapEditor::connectToServer()
3.68 @@ -4865,33 +4867,24 @@
3.69
3.70 void MapEditor::readData ()
3.71 {
3.72 - cout <<"readData bytesAvail="<<clientSocket->bytesAvailable()<<endl;
3.73 - quint16 recCounter;
3.74 - quint16 blockSize;
3.75 -
3.76 - QDataStream in(clientSocket);
3.77 - in.setVersion(QDataStream::Qt_4_0);
3.78 -
3.79 - in >> blockSize;
3.80 - in >> recCounter;
3.81 -
3.82 - char *sp;
3.83 - uint l;
3.84 - in.readBytes (sp,l);
3.85 - cout << " sp="<<sp<<" l="<<l<<endl;
3.86 - QString t;
3.87 - in >>t;
3.88 - cout << " t="<<t.ascii()<<endl;
3.89 -
3.90 while (clientSocket->bytesAvailable() >=(int)sizeof(quint16) )
3.91 {
3.92 - //cout <<"readData 1 bytesAvail="<<clientSocket->bytesAvailable()<<" readData bS="<<blockSize<<" rC="<<recCounter<<endl;
3.93 - QString s;
3.94 - in >> s;
3.95 - //cout << "Received: "<< recCounter<< " "<<s.ascii() <<endl;
3.96 - cout <<" bytesAvail="<<clientSocket->bytesAvailable()<<" bS="<<blockSize<<" counter="<<recCounter<<" s="<<s.ascii()<<endl;
3.97 - parseAtom (s);
3.98 + cout <<"readData bytesAvail="<<clientSocket->bytesAvailable();
3.99 + quint16 recCounter;
3.100 + quint16 blockSize;
3.101 +
3.102 + QDataStream in(clientSocket);
3.103 + in.setVersion(QDataStream::Qt_4_0);
3.104 +
3.105 + in >> blockSize;
3.106 + in >> recCounter;
3.107 +
3.108 + QString t;
3.109 + in >>t;
3.110 + cout << " t="<<t.ascii()<<endl;
3.111 + parseAtom (t);
3.112 }
3.113 + return;
3.114 }
3.115
3.116 void MapEditor::displayNetworkError(QAbstractSocket::SocketError socketError)
4.1 --- a/parser.cpp Fri Jun 29 09:43:54 2007 +0000
4.2 +++ b/parser.cpp Fri Jun 29 15:12:04 2007 +0000
4.3 @@ -31,8 +31,6 @@
4.4 QRegExp re;
4.5 int pos;
4.6
4.7 - cout << "parseAtom s="<<s.ascii()<<endl;
4.8 -
4.9 // Strip WS at beginning
4.10 re.setPattern ("\\w");
4.11 re.setMinimal (true);