From 5a26e46aaa38cccb2b38cfc784364f1f265cec9b Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Mon, 20 Aug 2018 13:56:16 +0100 Subject: [PATCH] Formspecs: Fix invalid background warning Clipped backgrounds are still valid with no size[] tag, as they will apply themselves correctly to any size Fixes #7197 --- src/gui/guiFormSpecMenu.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gui/guiFormSpecMenu.cpp b/src/gui/guiFormSpecMenu.cpp index 948ee4030..ed94b82de 100644 --- a/src/gui/guiFormSpecMenu.cpp +++ b/src/gui/guiFormSpecMenu.cpp @@ -668,15 +668,16 @@ void GUIFormSpecMenu::parseBackground(parserData* data, const std::string &eleme geom.X = stof(v_geom[0]) * spacing.X; geom.Y = stof(v_geom[1]) * spacing.Y; - if (!data->explicit_size) - warningstream<<"invalid use of background without a size[] element"<explicit_size && !clip) + warningstream << "invalid use of unclipped background without a size[] element" << std::endl; + m_backgrounds.emplace_back(name, pos, geom, clip); return; -- 2.25.1