Changeset View
Changeset View
Standalone View
Standalone View
plugins/defaultTools/defaulttool/DefaultTool.cpp
Show First 20 Lines • Show All 542 Lines • ▼ Show 20 Line(s) | 536 | if (bound.contains(event->point)) { | |||
---|---|---|---|---|---|
543 | } | 543 | } | ||
544 | } else { | 544 | } else { | ||
545 | /*if (m_lastHandle != KoFlake::NoHandle) | 545 | /*if (m_lastHandle != KoFlake::NoHandle) | ||
546 | repaintDecorations(); */ | 546 | repaintDecorations(); */ | ||
547 | m_lastHandle = KoFlake::NoHandle; | 547 | m_lastHandle = KoFlake::NoHandle; | ||
548 | m_mouseWasInsideHandles = false; | 548 | m_mouseWasInsideHandles = false; | ||
549 | 549 | | |||
550 | if (m_guideLine->isSelected()) { | 550 | if (m_guideLine->isSelected()) { | ||
551 | GuidesTool *guidesTool = dynamic_cast<GuidesTool*>(KoToolManager::instance()->toolById(canvas(), GuidesToolId)); | 551 | GuidesTool *guidesTool = dynamic_cast<GuidesTool*>(KoToolManager::instance()->toolById(canvas(), GuidesTool_ID)); | ||
552 | if (guidesTool) { | 552 | if (guidesTool) { | ||
553 | guidesTool->moveGuideLine(m_guideLine->orientation(), m_guideLine->index()); | 553 | guidesTool->moveGuideLine(m_guideLine->orientation(), m_guideLine->index()); | ||
554 | activateTemporary(guidesTool->toolId()); | 554 | activateTemporary(guidesTool->toolId()); | ||
555 | } | 555 | } | ||
556 | } else { | 556 | } else { | ||
557 | selectGuideAtPosition(event->point); | 557 | selectGuideAtPosition(event->point); | ||
558 | } | 558 | } | ||
559 | } | 559 | } | ||
560 | } else { | 560 | } else { | ||
561 | if (m_guideLine->isSelected()) { | 561 | if (m_guideLine->isSelected()) { | ||
562 | GuidesTool *guidesTool = dynamic_cast<GuidesTool*>(KoToolManager::instance()->toolById(canvas(), GuidesToolId)); | 562 | GuidesTool *guidesTool = dynamic_cast<GuidesTool*>(KoToolManager::instance()->toolById(canvas(), GuidesTool_ID)); | ||
563 | if (guidesTool) { | 563 | if (guidesTool) { | ||
564 | guidesTool->moveGuideLine(m_guideLine->orientation(), m_guideLine->index()); | 564 | guidesTool->moveGuideLine(m_guideLine->orientation(), m_guideLine->index()); | ||
565 | activateTemporary(guidesTool->toolId()); | 565 | activateTemporary(guidesTool->toolId()); | ||
566 | } | 566 | } | ||
567 | } else { | 567 | } else { | ||
568 | selectGuideAtPosition(event->point); | 568 | selectGuideAtPosition(event->point); | ||
569 | } | 569 | } | ||
570 | } | 570 | } | ||
▲ Show 20 Lines • Show All 65 Lines • ▼ Show 20 Line(s) | 635 | if (shape->boundingRect().contains(event->point) && // first 'cheap' check | |||
636 | shape->outline().contains(event->point)) // this is more expensive but weeds out the almost hits | 636 | shape->outline().contains(event->point)) // this is more expensive but weeds out the almost hits | ||
637 | shapes.append(shape); | 637 | shapes.append(shape); | ||
638 | } | 638 | } | ||
639 | if (shapes.count() == 0) { // nothing in the selection was clicked on. | 639 | if (shapes.count() == 0) { // nothing in the selection was clicked on. | ||
640 | KoShape *shape = canvas()->shapeManager()->shapeAt (event->point, KoFlake::ShapeOnTop); | 640 | KoShape *shape = canvas()->shapeManager()->shapeAt (event->point, KoFlake::ShapeOnTop); | ||
641 | if (shape) { | 641 | if (shape) { | ||
642 | shapes.append(shape); | 642 | shapes.append(shape); | ||
643 | } else if (m_guideLine->isSelected()) { | 643 | } else if (m_guideLine->isSelected()) { | ||
644 | GuidesTool *guidesTool = dynamic_cast<GuidesTool*>(KoToolManager::instance()->toolById(canvas(), GuidesToolId)); | 644 | GuidesTool *guidesTool = dynamic_cast<GuidesTool*>(KoToolManager::instance()->toolById(canvas(), GuidesTool_ID)); | ||
645 | if (guidesTool) { | 645 | if (guidesTool) { | ||
646 | guidesTool->editGuideLine(m_guideLine->orientation(), m_guideLine->index()); | 646 | guidesTool->editGuideLine(m_guideLine->orientation(), m_guideLine->index()); | ||
647 | activateTool(guidesTool->toolId()); | 647 | activateTool(guidesTool->toolId()); | ||
648 | return; | 648 | return; | ||
649 | } | 649 | } | ||
650 | } | 650 | } | ||
651 | } | 651 | } | ||
652 | 652 | | |||
▲ Show 20 Lines • Show All 673 Lines • Show Last 20 Lines |