handled selectall keyboard shortcut on board

preferencesAboutTextFull
Claudio Valerio 12 years ago
parent 1423fb937a
commit 1ff95dbf03
  1. 10
      src/domain/UBGraphicsScene.cpp
  2. 4
      src/domain/UBGraphicsScene.h

@ -2188,6 +2188,16 @@ void UBGraphicsScene::keyReleaseEvent(QKeyEvent * keyEvent)
QList<QGraphicsItem*> si = selectedItems(); QList<QGraphicsItem*> si = selectedItems();
if(keyEvent->matches(QKeySequence::SelectAll)){
QListIterator<QGraphicsItem*> itItems(this->mFastAccessItems);
while (itItems.hasNext())
itItems.next()->setSelected(true);
keyEvent->accept();
return;
}
if ((si.size() > 0) && (keyEvent->isAccepted())) if ((si.size() > 0) && (keyEvent->isAccepted()))
{ {
#ifdef Q_OS_MAC #ifdef Q_OS_MAC

@ -356,8 +356,8 @@ public slots:
void recolorAllItems(); void recolorAllItems();
virtual void drawItems (QPainter * painter, int numItems, virtual void drawItems (QPainter * painter, int numItems,
QGraphicsItem * items[], const QStyleOptionGraphicsItem options[], QWidget * widget = 0); QGraphicsItem * items[], const QStyleOptionGraphicsItem options[], QWidget * widget = 0);
QGraphicsItem* rootItem(QGraphicsItem* item) const; QGraphicsItem* rootItem(QGraphicsItem* item) const;

Loading…
Cancel
Save