Skip to content

Commit

Permalink
Do not recolor collision while block is moved and flipped/rotated (fixes
Browse files Browse the repository at this point in the history
 #73)
  • Loading branch information
ElTh0r0 committed Jun 28, 2024
1 parent dd4c09c commit 7107c25
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,9 @@ void Block::rotateBlock(const int nDelta) {
m_PolyShape.translate(nTranslateX, nTranslateY); // Move back
// qDebug() << "After rot.:" << m_PolyShape;

this->checkBlockIntersection();
if (!m_bActive) {
this->checkBlockIntersection();
}
}

// ---------------------------------------------------------------------------
Expand All @@ -269,7 +271,9 @@ void Block::flipBlock() {
m_PolyShape.translate(this->boundingRect().width(), 0); // Move back
// qDebug() << "After flip:" << m_PolyShape;

this->checkBlockIntersection();
if (!m_bActive) {
this->checkBlockIntersection();
}
}

// ---------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions data/unix/com.github.elth0r0.iqpuzzle.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
<lang percentage="100">nb_NO</lang>
<lang percentage="100">nl</lang>
<lang percentage="100">pt</lang>
<lang percentage="100">ru</lang>
<lang percentage="100">pt_BR</lang>
<lang percentage="96">zh_CN</lang>
<lang percentage="96">zh_TW</lang>
Expand Down

0 comments on commit 7107c25

Please sign in to comment.