diff --git a/GUI/Models/InstrumentItems.h b/GUI/Models/InstrumentItems.h index 58393bb537c65da13025b1178aa432e9e0d15ed5..295fbb872370f0f74120fe87ea8ed67aa856dd9e 100644 --- a/GUI/Models/InstrumentItems.h +++ b/GUI/Models/InstrumentItems.h @@ -174,6 +174,9 @@ public: template <typename T> T* InstrumentItem::setBackgroundType() { + static_assert(std::is_base_of<BackgroundItem,T>::value, + "Class must be derived from BackgroundItem"); + return setGroupPropertyType<T>(P_BACKGROUND); }