diff options
author | Roopesh Chander <roop@forwardbias.in> | 2009-11-03 20:14:08 +0530 |
---|---|---|
committer | Roopesh Chander <roop@forwardbias.in> | 2009-11-03 20:14:08 +0530 |
commit | 05a1b090dfcd7f3dfa509bb8de4043d699c000ae (patch) | |
tree | e15d507453eb5a6a2f16a557986b6425e49dc058 /mainwindow.cpp | |
parent | aa69057d2b9ebacc1cae995c57969e23a2b97785 (diff) |
delete scraps from the dropdown too
Diffstat (limited to 'mainwindow.cpp')
-rw-r--r-- | mainwindow.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mainwindow.cpp b/mainwindow.cpp index c7cfbaf..6db0d53 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -293,9 +293,12 @@ void MainWindow::removeSenderScrap() { scrap = qobject_cast<QGraphicsWidget*>(sender()); if (scrap) { m_graphicsView->scene()->removeItem(scrap); - for (int i = 0; i < m_scraps.count(); i++) - if (m_scraps.at(i) == scrap) + for (int i = 0; i < m_scraps.count(); i++) { + if (m_scraps.at(i) == scrap) { m_scraps.removeAt(i); + m_dropDownList->removeItem(i+1); + } + } scrap->deleteLater(); } adjustTitle(); |