1.1 --- a/mainwindow.cpp Mon Aug 03 10:42:12 2009 +0000
1.2 +++ b/mainwindow.cpp Thu Aug 06 10:42:17 2009 +0000
1.3 @@ -549,6 +549,15 @@
1.4 connect( a, SIGNAL( triggered() ), this, SLOT( editDeleteSelection() ) );
1.5 actionDelete=a;
1.6
1.7 + // Shortcut to add attribute
1.8 + a= new QAction(tr( "Add attribute" ), this);
1.9 + a->setShortcut ( Qt::Key_Q);
1.10 + a->setShortcutContext (Qt::WindowShortcut);
1.11 + addAction (a);
1.12 + connect( a, SIGNAL( triggered() ), this, SLOT( editAddAttribute() ) );
1.13 + actionAddAttribute= a;
1.14 +
1.15 +
1.16 // Shortcut to add mapcenter
1.17 a= new QAction(QPixmap(iconPath+"newmapcenter.png"),tr( "Add mapcenter","Canvas context menu" ), this);
1.18 a->setShortcut ( Qt::Key_M);
1.19 @@ -2757,6 +2766,12 @@
1.20 if (m) m->unscrollChildren();
1.21 }
1.22
1.23 +void Main::editAddAttribute()
1.24 +{
1.25 + VymModel *m=currentModel();
1.26 + if (m) m->addAttribute();
1.27 +}
1.28 +
1.29 void Main::editAddMapCenter()
1.30 {
1.31 VymModel *m=currentModel();