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); }