|
52 | 52 | #include <QtGui/QClipboard>
|
53 | 53 | #include <QtGui/QInputDialog>
|
54 | 54 | #include <QtGui/QGraphicsProxyWidget>
|
| 55 | +#include <QtGui/QScrollBar> |
55 | 56 | #include <QtXml/QDomDocument>
|
56 | 57 |
|
57 | 58 | #include <KDE/KTextEdit>
|
@@ -1319,7 +1320,8 @@ void BasketScene::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
1319 | 1320 | if( m_editor && !shiftPressed && !controlPressed )
|
1320 | 1321 | {
|
1321 | 1322 | //if the mouse is over the editor
|
1322 |
| - QGraphicsWidget *widget = dynamic_cast<QGraphicsWidget*>(m_view->itemAt(event->scenePos().toPoint())); |
| 1323 | + QPoint view_shift(m_view->horizontalScrollBar()->value(), m_view->verticalScrollBar()->value()); |
| 1324 | + QGraphicsWidget *widget = dynamic_cast<QGraphicsWidget*>(m_view->itemAt((event->scenePos() - view_shift).toPoint())); |
1323 | 1325 | if(widget && m_editor->graphicsWidget() == widget)
|
1324 | 1326 | {
|
1325 | 1327 | if(event->button() == Qt::LeftButton)
|
@@ -1821,6 +1823,8 @@ void BasketScene::dropEvent(QGraphicsSceneDragDropEvent *event)
|
1821 | 1823 | // Then noteAt() is called for the mouse pointer position, because the basket is now smaller, the cursor is out of boundaries!!!
|
1822 | 1824 | // Should, of course, not return 0:
|
1823 | 1825 | Note *clicked = noteAt(pos);
|
| 1826 | + if(clicked && clicked->allSelected()) |
| 1827 | + clicked = 0; |
1824 | 1828 |
|
1825 | 1829 | if (NoteFactory::movingNotesInTheSameBasket(event->mimeData(), this, event->dropAction()) && event->dropAction() == Qt::MoveAction) {
|
1826 | 1830 | m_doNotCloseEditor = true;
|
|
0 commit comments