comparison view/Pane.cpp @ 650:12d570c27d85 tonioni

split drag delete
author matthiasm
date Sun, 16 Jun 2013 00:16:37 +0100
parents ba76130ed7e5
children
comparison
equal deleted inserted replaced
648:f61a54364d1d 650:12d570c27d85
1385 } else if (mode == ViewManager::NoteEditMode) { 1385 } else if (mode == ViewManager::NoteEditMode) {
1386 1386
1387 std::cerr << "mouse pressed in note edit mode" << std::endl; 1387 std::cerr << "mouse pressed in note edit mode" << std::endl;
1388 Layer *layer = getSelectedLayer(); 1388 Layer *layer = getSelectedLayer();
1389 if (layer && layer->isLayerEditable()) { 1389 if (layer && layer->isLayerEditable()) {
1390 layer->splitStart(this, e); 1390 layer->multiStart(this, e);
1391 } 1391 }
1392 1392
1393 } else if (mode == ViewManager::EditMode) { 1393 } else if (mode == ViewManager::EditMode) {
1394 1394
1395 // Do nothing here -- we'll do it in mouseMoveEvent when the 1395 // Do nothing here -- we'll do it in mouseMoveEvent when the
1489 } else if (mode == ViewManager::NoteEditMode) { 1489 } else if (mode == ViewManager::NoteEditMode) {
1490 1490
1491 //GF: handle mouse release for NoteEditMode (note: works but will need to re-think this a bit later) 1491 //GF: handle mouse release for NoteEditMode (note: works but will need to re-think this a bit later)
1492 Layer *layer = getSelectedLayer(); 1492 Layer *layer = getSelectedLayer();
1493 if (layer && layer->isLayerEditable()) { 1493 if (layer && layer->isLayerEditable()) {
1494 layer->splitEnd(this, e); 1494 layer->multiEnd(this, e);
1495 update(); } 1495 update(); }
1496 1496
1497 if (m_editing) { 1497 if (m_editing) {
1498 if (!editSelectionEnd(e)) { 1498 if (!editSelectionEnd(e)) {
1499 Layer *layer = getSelectedLayer(); 1499 Layer *layer = getSelectedLayer();
1717 1717
1718 Layer *layer = getTopLayer(); 1718 Layer *layer = getTopLayer();
1719 if (layer) { 1719 if (layer) {
1720 layer->measureDrag(this, e); 1720 layer->measureDrag(this, e);
1721 if (layer->hasTimeXAxis()) edgeScrollMaybe(e->x()); 1721 if (layer->hasTimeXAxis()) edgeScrollMaybe(e->x());
1722 }
1723
1724 update();
1725 } else if (mode == ViewManager::NoteEditMode) {
1726
1727 Layer *layer = getTopLayer();
1728 if (layer) {
1729 layer->multiDrag(this, e);
1722 } 1730 }
1723 1731
1724 update(); 1732 update();
1725 } 1733 }
1726 } 1734 }
2461 if (m_measureCursor1) setCursor(*m_measureCursor1); 2469 if (m_measureCursor1) setCursor(*m_measureCursor1);
2462 break; 2470 break;
2463 2471
2464 // GF: NoteEditMode uses the same default cursor as EditMode, but it will change in a context sensitive manner. 2472 // GF: NoteEditMode uses the same default cursor as EditMode, but it will change in a context sensitive manner.
2465 case ViewManager::NoteEditMode: 2473 case ViewManager::NoteEditMode:
2466 setCursor(Qt::UpArrowCursor); 2474 setCursor(Qt::UpArrowCursor);
2467 break; 2475 break;
2468 2476
2469 /* 2477 /*
2470 case ViewManager::TextMode: 2478 case ViewManager::TextMode:
2471 setCursor(Qt::IBeamCursor); 2479 setCursor(Qt::IBeamCursor);