From 9042de4ab2eee826d8c19f724a26834a8a3bdb31 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Fri, 10 May 2013 00:55:23 +0200 Subject: [PATCH] Make sure to apply the changes, when changing properties. --HG-- branch : gsoc2012-gui-editor --- code/nel/src/gui/widget_manager.cpp | 3 --- .../src/plugins/gui_editor/editor_message_processor.cpp | 5 +++-- .../src/plugins/gui_editor/property_browser_ctrl.cpp | 6 ++++++ .../src/plugins/gui_editor/widgets/ViewText.xml | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/code/nel/src/gui/widget_manager.cpp b/code/nel/src/gui/widget_manager.cpp index f718f63a7..bad93687b 100644 --- a/code/nel/src/gui/widget_manager.cpp +++ b/code/nel/src/gui/widget_manager.cpp @@ -3300,9 +3300,6 @@ namespace NLGUI v->setParent( g ); - // Invalidate so it shows up! - v->invalidateCoords(); - notifyAdditionWatchers( v->getId() ); return v; diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp index 44d0ad562..c784fa527 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp @@ -123,8 +123,9 @@ namespace GUIEditor e->setParentPosRef( Hotspot_TL ); e->setPosRef( Hotspot_TL ); - // Apply the new settings - e->invalidateCoords(); + // Apply the new settings + e->setActive( false ); + e->setActive( true ); } } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/property_browser_ctrl.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/property_browser_ctrl.cpp index 3c5fa9177..82330bfaf 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/property_browser_ctrl.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/property_browser_ctrl.cpp @@ -111,6 +111,12 @@ namespace GUIEditor if( e == NULL ) return; e->setProperty( propName.toUtf8().constData(), propValue.toUtf8().constData() ); + + + // Make sure the changes are applied + bool active = e->getActive(); + e->setActive( !active ); + e->setActive( active ); } void CPropBrowserCtrl::setupProperties( const std::string &type, const CInterfaceElement *element ) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewText.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewText.xml index f2a0b28df..9490a1eee 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewText.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewText.xml @@ -47,7 +47,7 @@ line_maxw int - 0 + 100 multi_line_space