From addae64d8c028ffd2c3bb05ec7ebdd1a73720998 Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 2 May 2012 14:38:54 +0000 Subject: NxWM initial displays come up okay git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4687 42af7a65-404d-4744-a932-0658087f49c3 --- NxWidgets/libnxwidgets/src/cnxtkwindow.cxx | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'NxWidgets/libnxwidgets/src/cnxtkwindow.cxx') diff --git a/NxWidgets/libnxwidgets/src/cnxtkwindow.cxx b/NxWidgets/libnxwidgets/src/cnxtkwindow.cxx index ba62ee435..bae9cb815 100644 --- a/NxWidgets/libnxwidgets/src/cnxtkwindow.cxx +++ b/NxWidgets/libnxwidgets/src/cnxtkwindow.cxx @@ -133,23 +133,12 @@ CNxToolbar *CNxTkWindow::openToolbar(nxgl_coord_t height) { if (m_hNxTkWindow && !m_toolbar) { - // Get current window style from the widget control - - CWidgetStyle style; - m_widgetControl->getWidgetStyle(&style); - - // Create a new controlling widget for the window - - CWidgetControl *widgetControl = new CWidgetControl(&style); - - // And create the toolcar + // Create the toolbar. Note that we use the SAME underlying + // widget control. That is because the tool bar really resides + // in the same "physical" window. m_toolbar = new CNxToolbar(this, m_hNxTkWindow, - widgetControl, height); - if (!m_toolbar) - { - delete widgetControl; - } + m_widgetControl, height); } return m_toolbar; } -- cgit v1.2.3