1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-23 19:10:21 +00:00

Potential fix for context sensitive select mode issues.

This commit is contained in:
Aesylwinn 2016-08-14 14:43:29 -04:00
parent 101c3cc90d
commit 3e4ac0c662

View file

@ -215,8 +215,12 @@ bool CSVRender::InstanceMode::primaryEditStartDrag (const QPoint& pos)
if (mDragMode!=DragMode_None || mLocked) if (mDragMode!=DragMode_None || mLocked)
return false; return false;
WorldspaceHitResult hit = getWorldspaceWidget().mousePick (pos, getWorldspaceWidget().getInteractionMask()); WorldspaceHitResult hit = getWorldspaceWidget().mousePick (pos, getWorldspaceWidget().getInteractionMask());
std::vector<osg::ref_ptr<TagBase> > selection = getWorldspaceWidget().getSelection (Mask_Reference);
if (selection.empty())
{
// Only change selection at the start of drag if no object is already selected
if (hit.tag && CSMPrefs::get()["3D Scene Input"]["context-select"].isTrue()) if (hit.tag && CSMPrefs::get()["3D Scene Input"]["context-select"].isTrue())
{ {
getWorldspaceWidget().clearSelection (Mask_Reference); getWorldspaceWidget().clearSelection (Mask_Reference);
@ -227,11 +231,10 @@ bool CSVRender::InstanceMode::primaryEditStartDrag (const QPoint& pos)
} }
} }
std::vector<osg::ref_ptr<TagBase> > selection = selection = getWorldspaceWidget().getSelection (Mask_Reference);
getWorldspaceWidget().getSelection (Mask_Reference);
if (selection.empty()) if (selection.empty())
return false; return false;
}
for (std::vector<osg::ref_ptr<TagBase> >::iterator iter (selection.begin()); for (std::vector<osg::ref_ptr<TagBase> >::iterator iter (selection.begin());
iter!=selection.end(); ++iter) iter!=selection.end(); ++iter)