From 2ee86da670acfa648065d099381e31ded2958c64 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Wed, 3 Sep 2014 16:14:38 +0200 Subject: [PATCH] Apply changes. --HG-- branch : dfighter-tools --- .../georges_editor/typ_browser_ctrl.cpp | 32 ++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/code/studio/src/plugins/georges_editor/typ_browser_ctrl.cpp b/code/studio/src/plugins/georges_editor/typ_browser_ctrl.cpp index 144156cfc..49d5e75fa 100644 --- a/code/studio/src/plugins/georges_editor/typ_browser_ctrl.cpp +++ b/code/studio/src/plugins/georges_editor/typ_browser_ctrl.cpp @@ -73,7 +73,7 @@ void TypBrowserCtrl::load() vp->setValue( m_typ->Min.c_str() ); m_browser->addProperty( vp ); - vp = m_variantMgr->addProperty( QVariant::String, "Max" ); + vp = m_variantMgr->addProperty( QVariant::String, "max" ); vp->setValue( m_typ->Max.c_str() ); m_browser->addProperty( vp ); @@ -86,10 +86,40 @@ void TypBrowserCtrl::load() void TypBrowserCtrl::onVariantValueChanged( QtProperty *p, const QVariant &v ) { + QString n = p->propertyName(); + if( n == "default" ) + { + m_typ->Default = v.toString().toUtf8().constData(); + } + else + if( n == "min" ) + { + m_typ->Min = v.toString().toUtf8().constData(); + } + else + if( n == "max" ) + { + m_typ->Max = v.toString().toUtf8().constData(); + } + else + if( n == "increment" ) + { + m_typ->Increment = v.toString().toUtf8().constData(); + } } void TypBrowserCtrl::onEnumValueChanged( QtProperty *p, int v ) { + QString n = p->propertyName(); + if( n == "type" ) + { + m_typ->Type = NLGEORGES::UType::TType( v ); + } + else + if( n == "uitype" ) + { + m_typ->UIType = NLGEORGES::CType::TUI( v ); + } } void TypBrowserCtrl::enableMgrConnections()