From e4be3a7e7d1eb03625e4c562735021cb6ffd6316 Mon Sep 17 00:00:00 2001 From: Reinder Feenstra Date: Fri, 13 May 2022 18:56:09 +0200 Subject: [PATCH] added disabled checkbox to script editor --- client/src/widget/object/luascripteditwidget.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/src/widget/object/luascripteditwidget.cpp b/client/src/widget/object/luascripteditwidget.cpp index 7672fd30..c4aaa206 100644 --- a/client/src/widget/object/luascripteditwidget.cpp +++ b/client/src/widget/object/luascripteditwidget.cpp @@ -3,7 +3,7 @@ * * This file is part of the traintastic source code. * - * Copyright (C) 2019-2020 Reinder Feenstra + * Copyright (C) 2019-2020,2022 Reinder Feenstra * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -29,6 +29,7 @@ #include "../../network/property.hpp" #include "../../network/method.hpp" #include "../propertylineedit.hpp" +#include "../propertycheckbox.hpp" #include "../propertyluacodeedit.hpp" #include "../../theme/theme.hpp" @@ -73,6 +74,9 @@ void LuaScriptEditWidget::buildForm() if(Property* property = dynamic_cast(m_object->getProperty(name))) form->addRow(property->displayName(), new PropertyLineEdit(*property, this)); + if(Property* property = dynamic_cast(m_object->getProperty("disabled"))) + form->addRow(property->displayName(), new PropertyCheckBox(*property, this)); + QToolBar* toolbar = new QToolBar(this); m_start = toolbar->addAction(Theme::getIcon("run"), m_methodStart->displayName(), [this]()