BlockView selection fix - many bugs with 1 fix (ctrl+click, ctrl+selection_rect, selection disappear)

This commit is contained in:
2020-10-14 01:47:15 +03:00
parent 32f2c061d1
commit 59711afa14
2 changed files with 9 additions and 1 deletions

View File

@@ -363,7 +363,7 @@ bool BlockView::eventFilter(QObject * o, QEvent * e) {
if (cur_bus) {
return false;
}
//qDebug() << "move mm_ci" << mm_ci;
//qDebug() << "move mm_ci" << mm_ci << mm_cancel;
if (mm_ci)
if (mm_ci->data(bvidTmpItem).toBool()) {
mm_ci = 0;
@@ -1210,6 +1210,7 @@ QRectF BlockView::itemsBoundingRect() const {
void BlockView::restoreSelState() {
//qDebug() << "restoreSelState";
foreach (QGraphicsItem * i, sel_items) {
i->setPos(i->data(bvidItemPos).toPointF());
}
@@ -1224,6 +1225,7 @@ void BlockView::restoreSelState() {
void BlockView::saveSelState() {
//qDebug() << "saveSelState";
QList<QGraphicsItem*> gi = scene_->items();
sel_items = scene_->selectedItems();
foreach (QGraphicsItem * i, gi) {