Amelioration des methodes de selection dans l'editeur d'element.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@593 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavier
2009-04-18 14:21:08 +00:00
parent c3769490f6
commit 4fea5dee44
2 changed files with 12 additions and 1 deletions

View File

@@ -596,7 +596,8 @@ QRectF ElementScene::borderRect() const {
"bounding rect" de l'element
*/
QRectF ElementScene::sceneContent() const {
return(itemsBoundingRect().unite(borderRect()));
qreal adjustment = 5.0;
return(itemsBoundingRect().unite(borderRect()).adjusted(-adjustment, -adjustment, adjustment, adjustment));
}
/**
@@ -684,7 +685,10 @@ void ElementScene::paste() {
Selectionne tout
*/
void ElementScene::slot_selectAll() {
blockSignals(true);
foreach(QGraphicsItem *qgi, items()) qgi -> setSelected(true);
blockSignals(false);
emit(selectionChanged());
}
/**
@@ -698,7 +702,10 @@ void ElementScene::slot_deselectAll() {
Inverse la selection
*/
void ElementScene::slot_invertSelection() {
blockSignals(true);
foreach(QGraphicsItem *qgi, items()) qgi -> setSelected(!qgi -> isSelected());
blockSignals(false);
emit(selectionChanged());
}
/**