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:
parent
101c3cc90d
commit
3e4ac0c662
1 changed files with 17 additions and 14 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue