# HG changeset patch # User insilmaril # Date 1150296198 0 # Node ID db50e4164311e1c833bae8b4b9b085f25aab622c # Parent 5cfbba1dc2f8fbdd9d7a8d8a7127bf9198bafa76 Basic editing works again diff -r 5cfbba1dc2f8 -r db50e4164311 aboutdialog.cpp --- a/aboutdialog.cpp Wed Jun 14 10:28:01 2006 +0000 +++ b/aboutdialog.cpp Wed Jun 14 14:43:18 2006 +0000 @@ -21,7 +21,7 @@ mainLayout=new QVBoxLayout( this, 10); tabs=new QTabWidget (this); - credits=new AboutTextBrowser (tabs,"credits"); + credits=new AboutTextBrowser (parent,"credits"); credits->setText ( "
Copyright (C) 2004-2005 Uwe Drechsel
" diff -r 5cfbba1dc2f8 -r db50e4164311 mainwindow.cpp --- a/mainwindow.cpp Wed Jun 14 10:28:01 2006 +0000 +++ b/mainwindow.cpp Wed Jun 14 14:43:18 2006 +0000 @@ -502,28 +502,29 @@ actionEditPaste=a; // Shortcuts to modify heading: - /* a = new QAction(tr( "Edit heading" ),this); a->setStatusTip ( tr( "edit Heading" )); a->setShortcut ( Qt::Key_Enter); + a->setShortcutContext (Qt::ApplicationShortcut); + addAction (a); connect( a, SIGNAL( triggered() ), this, SLOT( editHeading() ) ); actionListBranches.append(a); - */ a = new QAction( tr( "Edit heading" ), this); a->setStatusTip (tr( "edit Heading" )); a->setShortcut (Qt::Key_Return ); connect( a, SIGNAL( activated() ), this, SLOT( editHeading() ) ); - //actionListBranches.append(a); + actionListBranches.append(a); editMenu->addAction (a); + a->setShortcutContext (Qt::ApplicationShortcut); + addAction (a); actionEditHeading=a; - /* - a = new QAction( tr( "Edit heading" ),this); + a = new QAction( tr( "Edit heading" ), this); a->setStatusTip (tr( "edit Heading" )); a->setShortcut ( Qt::Key_F2 ); + a->setShortcutContext (Qt::ApplicationShortcut); + addAction (a); connect( a, SIGNAL( activated() ), this, SLOT( editHeading() ) ); - a->setEnabled (false); actionListBranches.append(a); - */ // Shortcut to delete selection a = new QAction( tr( "Delete Selection" ),this); @@ -2683,19 +2684,12 @@ void Main::editHeading() { - qWarning ("Main::editHeading called"); if (currentMapEditor()) currentMapEditor()->editHeading(); } void Main::editNewBranch() { - //FIXME - // tried to see if maybe currentMapEditor is not set, but - // ME does not seem to send a key event anyway...:q - //here i was last time... - - cout << "Main::editNewBranch\n"; if (currentMapEditor()) currentMapEditor()->addNewBranch(0); } diff -r 5cfbba1dc2f8 -r db50e4164311 mapeditor.cpp --- a/mapeditor.cpp Wed Jun 14 10:28:01 2006 +0000 +++ b/mapeditor.cpp Wed Jun 14 14:43:18 2006 +0000 @@ -1487,7 +1487,11 @@ void MapEditor::editHeading() { // Finish open lineEdits - if (lineedit) finishedLineEdit(); + if (lineedit->isVisible()) + { + finishedLineEdit(); + return; + } if (selection && (typeid(*selection) == typeid(BranchObj) ||