diff -r 5987f9f15bac -r 6269016c9905 mainwindow.cpp --- a/mainwindow.cpp Mon Aug 03 10:42:12 2009 +0000 +++ b/mainwindow.cpp Thu Aug 06 10:42:17 2009 +0000 @@ -549,6 +549,15 @@ connect( a, SIGNAL( triggered() ), this, SLOT( editDeleteSelection() ) ); actionDelete=a; + // Shortcut to add attribute + a= new QAction(tr( "Add attribute" ), this); + a->setShortcut ( Qt::Key_Q); + a->setShortcutContext (Qt::WindowShortcut); + addAction (a); + connect( a, SIGNAL( triggered() ), this, SLOT( editAddAttribute() ) ); + actionAddAttribute= a; + + // Shortcut to add mapcenter a= new QAction(QPixmap(iconPath+"newmapcenter.png"),tr( "Add mapcenter","Canvas context menu" ), this); a->setShortcut ( Qt::Key_M); @@ -2757,6 +2766,12 @@ if (m) m->unscrollChildren(); } +void Main::editAddAttribute() +{ + VymModel *m=currentModel(); + if (m) m->addAttribute(); +} + void Main::editAddMapCenter() { VymModel *m=currentModel();