|
|
|
@ -413,7 +413,7 @@ osg::ref_ptr<CSVRender::TagBase> CSVRender::WorldspaceWidget::mousePick (QMouseE
|
|
|
|
|
std::string CSVRender::WorldspaceWidget::mapButton (QMouseEvent *event)
|
|
|
|
|
{
|
|
|
|
|
std::pair<Qt::MouseButton, bool> phyiscal (
|
|
|
|
|
event->button(), QApplication::keyboardModifiers() & Qt::ControlModifier);
|
|
|
|
|
event->button(), event->modifiers() & Qt::ControlModifier);
|
|
|
|
|
|
|
|
|
|
std::map<std::pair<Qt::MouseButton, bool>, std::string>::const_iterator iter =
|
|
|
|
|
mButtonMapping.find (phyiscal);
|
|
|
|
@ -548,7 +548,7 @@ void CSVRender::WorldspaceWidget::mouseMoveEvent (QMouseEvent *event)
|
|
|
|
|
|
|
|
|
|
double factor = mDragFactor;
|
|
|
|
|
|
|
|
|
|
if (QApplication::keyboardModifiers() & Qt::ShiftModifier)
|
|
|
|
|
if (event->modifiers() & Qt::ShiftModifier)
|
|
|
|
|
factor *= mDragShiftFactor;
|
|
|
|
|
|
|
|
|
|
EditMode& editMode = dynamic_cast<CSVRender::EditMode&> (*mEditMode->getCurrent());
|
|
|
|
@ -593,7 +593,7 @@ void CSVRender::WorldspaceWidget::mouseReleaseEvent (QMouseEvent *event)
|
|
|
|
|
{
|
|
|
|
|
osg::ref_ptr<TagBase> tag = mousePick (event);
|
|
|
|
|
|
|
|
|
|
handleMouseClick (tag, button);
|
|
|
|
|
handleMouseClick (tag, button, event->modifiers() & Qt::ShiftModifier);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -614,7 +614,7 @@ void CSVRender::WorldspaceWidget::wheelEvent (QWheelEvent *event)
|
|
|
|
|
{
|
|
|
|
|
double factor = mDragWheelFactor;
|
|
|
|
|
|
|
|
|
|
if (QApplication::keyboardModifiers() & Qt::ShiftModifier)
|
|
|
|
|
if (event->modifiers() & Qt::ShiftModifier)
|
|
|
|
|
factor *= mDragShiftFactor;
|
|
|
|
|
|
|
|
|
|
EditMode& editMode = dynamic_cast<CSVRender::EditMode&> (*mEditMode->getCurrent());
|
|
|
|
@ -639,7 +639,7 @@ void CSVRender::WorldspaceWidget::keyPressEvent (QKeyEvent *event)
|
|
|
|
|
RenderWidget::keyPressEvent(event);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CSVRender::WorldspaceWidget::handleMouseClick (osg::ref_ptr<TagBase> tag, const std::string& button)
|
|
|
|
|
void CSVRender::WorldspaceWidget::handleMouseClick (osg::ref_ptr<TagBase> tag, const std::string& button, bool shift)
|
|
|
|
|
{
|
|
|
|
|
EditMode& editMode = dynamic_cast<CSVRender::EditMode&> (*mEditMode->getCurrent());
|
|
|
|
|
|
|
|
|
|