Add backwards compatibility for Image3DOverlays.

Using "billboard" to create an Image3DOverlay is deprecated.  Instead,
use "image3d" or, even better, use overlayManager.js.
This commit is contained in:
Zander Otavka 2015-08-07 02:45:05 -07:00
parent 3356bf31ac
commit 09bb61e4d8

View file

@ -138,6 +138,8 @@ unsigned int Overlays::addOverlay(const QString& type, const QScriptValue& prope
if (type == ImageOverlay::TYPE) {
thisOverlay = std::make_shared<ImageOverlay>();
} else if (type == Image3DOverlay::TYPE || type == "billboard") { // "billboard" for backwards compatibility
thisOverlay = std::make_shared<Image3DOverlay>();
} else if (type == TextOverlay::TYPE) {
thisOverlay = std::make_shared<TextOverlay>();
} else if (type == Text3DOverlay::TYPE) {
@ -158,8 +160,6 @@ unsigned int Overlays::addOverlay(const QString& type, const QScriptValue& prope
thisOverlay = std::make_shared<LocalModelsOverlay>(Application::getInstance()->getEntityClipboardRenderer());
} else if (type == ModelOverlay::TYPE) {
thisOverlay = std::make_shared<ModelOverlay>();
} else if (type == Image3DOverlay::TYPE) {
thisOverlay = std::make_shared<Image3DOverlay>();
}
if (thisOverlay) {