git-svn-id: svn://db.shs.com.ru/libs@596 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2019-09-19 13:13:56 +00:00
parent 296ac5ab5f
commit 575d710678
3 changed files with 4 additions and 0 deletions

View File

@@ -37,6 +37,7 @@ enum BlockviewItemData {
bvidInvalidItem = 1008, // bool
bvidDecorText = 1010, // QString
bvidBlockDecor = 1011, // bool
bvidDTHandle = 1012, // bool
bvidCorrectMove = 1100, // bool
};

View File

@@ -250,6 +250,7 @@ bool BlockView::eventFilter(QObject * o, QEvent * e) {
//qDebug() << mil;
while (!mil.isEmpty()) {
mm_ci = mil.front();
if (mm_ci->data(bvidDTHandle).toBool()) return QGraphicsView::eventFilter(o, e);
if (mm_ci->data(1008).toBool() || mm_ci->data(1007).toBool()) {
mil.pop_front();
} else break;
@@ -339,6 +340,7 @@ bool BlockView::eventFilter(QObject * o, QEvent * e) {
break;
}
if (mm_ci->data(1007).toBool()) break;
if (mm_ci->data(bvidDTHandle).toBool()) break;
if (mm_cancel) return true;
if (me->buttons().testFlag(Qt::LeftButton)) {
if (!mm_drag) {

View File

@@ -19,6 +19,7 @@ _DTSizeItem::_DTSizeItem(): QGraphicsObject() {
for (int i = 0; i < 8; ++i) {
//qDebug() << &(rects[i]);
rects[i].setData(1007, true);
rects[i].setData(bvidDTHandle, true);
rects[i].setFlag(QGraphicsItem::ItemIgnoresTransformations);
rects[i].setZValue(10.);
rects[i].setAcceptHoverEvents(true);