made drop distance configurable

coverity_scan
Marc Zinnschlag 9 years ago
parent 7dd7be7f0e
commit 5b9d6cce98

@ -190,6 +190,11 @@ void CSMPrefs::State::declare()
declareBool ("scene-hide-basic", "Hide basic 3D scenes tooltips", false);
declareInt ("scene-delay", "Tooltip delay in milliseconds", 500).
setMin (1);
declareCategory ("Scene Drops");
declareInt ("distance", "Drop Distance", 50).
setTooltip ("If an instance drop can not be placed against another object at the "
"insert point, it will be placed by this distance from the insert point instead");
}
void CSMPrefs::State::declareCategory (const std::string& key)

@ -360,7 +360,7 @@ osg::Vec3f CSVRender::WorldspaceWidget::getIntersectionPoint (const QPoint& loca
osg::Vec3d direction = end-start;
direction.normalize();
return start+direction * 50;
return start + direction * CSMPrefs::get()["Scene Drops"]["distance"].toInt();
}
void CSVRender::WorldspaceWidget::dragEnterEvent (QDragEnterEvent* event)

Loading…
Cancel
Save