mainwindow.cpp
changeset 531 be24af55da40
parent 528 36d140349897
child 534 32b71ba642aa
     1.1 --- a/mainwindow.cpp	Fri Jun 29 09:43:53 2007 +0000
     1.2 +++ b/mainwindow.cpp	Fri Jun 29 09:43:53 2007 +0000
     1.3 @@ -2744,13 +2744,13 @@
     1.4  		{
     1.5  			bool ok;
     1.6  			QPoint p;
     1.7 -			QString s=currentMapEditor()->getHeading(ok,p);
     1.8 +			QString s=me->getHeading(ok,p);
     1.9  
    1.10  			if (ok)
    1.11  			{
    1.12  				me->setStateEditHeading (true);
    1.13  #if defined(Q_OS_MACX)
    1.14 -				p=currentMapEditor()->mapTo (this,p);
    1.15 +				p=me->mapToGlobal (p);
    1.16  				QDialog *d =new QDialog(NULL);
    1.17  				QLineEdit *le=new QLineEdit (d);
    1.18  				d->setWindowFlags (Qt::FramelessWindowHint);
    1.19 @@ -2761,12 +2761,12 @@
    1.20  				connect (le, SIGNAL (returnPressed()), d, SLOT (accept()));
    1.21  				d->activateWindow();
    1.22  				d->exec();
    1.23 -				currentMapEditor()->setHeading (le->text());
    1.24 +				me->setHeading (le->text());
    1.25  				delete (le);
    1.26  				delete (d);
    1.27  				editHeadingFinished();
    1.28  #else
    1.29 -				p=currentMapEditor()->mapTo (this,p);
    1.30 +				p=me->mapTo (this,p);
    1.31  				lineedit->setGeometry(p.x(),p.y(),230,25);
    1.32  				lineedit->setText(s);
    1.33  				lineedit->setCursorPosition(1);
    1.34 @@ -3210,7 +3210,7 @@
    1.35  void Main::networkConnect()
    1.36  {
    1.37  	MapEditor *me=currentMapEditor();
    1.38 -	if (me) me->newServer();
    1.39 +	if (me) me->connectToServer();
    1.40  }
    1.41  
    1.42  bool Main::settingsPDF()
    1.43 @@ -3271,7 +3271,7 @@
    1.44  
    1.45  void Main::settingsAutosaveToggle()
    1.46  {
    1.47 -	settings.setValue ("/mapeditor/autosave/used",actionSettingsAutosaveToggle->isOn() );
    1.48 +	settings.setValue ("/mapeditor/autosave/use",actionSettingsAutosaveToggle->isOn() );
    1.49  }
    1.50  
    1.51  void Main::settingsAutosaveTime()
    1.52 @@ -3647,7 +3647,7 @@
    1.53  void Main::testFunction2()
    1.54  {
    1.55  	if (!currentMapEditor()) return;
    1.56 -	currentMapEditor()->testFunction2();
    1.57 +	currentMapEditor()->connectToServer();
    1.58  }
    1.59  
    1.60  void Main::testCommand()