mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-12-27 01:28:23 +00:00
fix view and workbench destroy issue.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@941 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2009-10-16 Bernard first version
|
||||
* 2010-09-24 Bernard fix view destroy issue
|
||||
*/
|
||||
#include <rtgui/dc.h>
|
||||
#include <rtgui/rtgui_system.h>
|
||||
@@ -119,7 +120,10 @@ void rtgui_view_destroy(rtgui_view_t* view)
|
||||
if (view->modal_show == RT_TRUE)
|
||||
rtgui_view_end_modal(view, RTGUI_MODAL_CANCEL);
|
||||
else
|
||||
{
|
||||
rtgui_view_hide(view);
|
||||
rtgui_widget_destroy(RTGUI_WIDGET(view));
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef RTGUI_USING_SMALL_SIZE
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2009-10-04 Bernard first version
|
||||
* 2010-09-24 Bernard fix workbench destroy issue
|
||||
*/
|
||||
#include <rtgui/rtgui_system.h>
|
||||
#include <rtgui/widgets/window.h>
|
||||
@@ -134,6 +135,9 @@ void rtgui_workbench_destroy(rtgui_workbench_t* workbench)
|
||||
{
|
||||
RT_ASSERT(workbench != RT_NULL);
|
||||
|
||||
/* hide workbench firstly */
|
||||
rtgui_workbench_hide(workbench);
|
||||
|
||||
if (RTGUI_TOPLEVEL(workbench)->server != RT_NULL)
|
||||
{
|
||||
struct rtgui_event_panel_detach edetach;
|
||||
|
||||
Reference in New Issue
Block a user