summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Yohansson Areeira Pinto <[email protected]>2017-07-27 17:27:32 +0200
committerAlbert Astals Cid <[email protected]>2017-07-27 17:27:32 +0200
commitf2b01f6999c99c94a68109fc81a44bb7b672d142 (patch)
tree3c924ae46aedfb53d51aa720b9b0e933580dadb6
parent0ebaf92c328ed301e93114cbc55f0803088b3465 (diff)
Don't let people add more balls when the repository is empty
REVIEW: 129015
-rw-r--r--kbbscalablegraphicwidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/kbbscalablegraphicwidget.cpp b/kbbscalablegraphicwidget.cpp
index b9ca8f7..d40cd89 100644
--- a/kbbscalablegraphicwidget.cpp
+++ b/kbbscalablegraphicwidget.cpp
@@ -542,7 +542,7 @@ void KBBScalableGraphicWidget::switchBall()
{
if ((m_balls->containsVisible(m_cursor->boxPosition())) || (m_ballsUnsure->containsVisible(m_cursor->boxPosition())))
removeBall(m_cursor->boxPosition());
- else
+ else if (m_ballRepository->ballToTake() != KBBGraphicsItemSet::NO_INDEX)
addBall(m_cursor->boxPosition());
}