Merge branch 'develop'
This commit is contained in:
		
						commit
						0691583de0
					
				| @ -213,6 +213,9 @@ namespace detail | |||||||
| 
 | 
 | ||||||
| 				if (impl_->wd_register.available(owner)) | 				if (impl_->wd_register.available(owner)) | ||||||
| 				{ | 				{ | ||||||
|  | 					if (owner->flags.destroying) | ||||||
|  | 						throw std::logic_error("the specified owner is destory"); | ||||||
|  | 
 | ||||||
| 					native = (owner->other.category == category::frame_tag::value ? | 					native = (owner->other.category == category::frame_tag::value ? | ||||||
| 										owner->other.attribute.frame->container : owner->root_widget->root); | 										owner->other.attribute.frame->container : owner->root_widget->root); | ||||||
| 					r.x += owner->pos_root.x; | 					r.x += owner->pos_root.x; | ||||||
| @ -303,6 +306,9 @@ namespace detail | |||||||
| 			if (impl_->wd_register.available(parent) == false) | 			if (impl_->wd_register.available(parent) == false) | ||||||
| 				throw std::invalid_argument("invalid parent/owner handle"); | 				throw std::invalid_argument("invalid parent/owner handle"); | ||||||
| 
 | 
 | ||||||
|  | 			if (parent->flags.destroying) | ||||||
|  | 				throw std::logic_error("the specified parent is destory"); | ||||||
|  | 
 | ||||||
| 			auto wdg_notifier = widget_notifier_interface::get_notifier(wdg); | 			auto wdg_notifier = widget_notifier_interface::get_notifier(wdg); | ||||||
| 
 | 
 | ||||||
| 			core_window_t * wd; | 			core_window_t * wd; | ||||||
|  | |||||||
| @ -776,10 +776,13 @@ namespace nana | |||||||
| 		//It will delete the element and recollocate when the window destroyed.
 | 		//It will delete the element and recollocate when the window destroyed.
 | ||||||
| 		event_handle _m_make_destroy(window wd) | 		event_handle _m_make_destroy(window wd) | ||||||
| 		{ | 		{ | ||||||
| 			return API::events(wd).destroy.connect([this](const arg_destroy& arg) | 			return API::events(wd).destroy.connect([this, wd](const arg_destroy& arg) | ||||||
| 			{ | 			{ | ||||||
| 				if (erase_element(elements, arg.window_handle)) | 				if (erase_element(elements, arg.window_handle)) | ||||||
| 					place_ptr_->collocate(); | 				{ | ||||||
|  | 					if (!API::is_destroying(API::get_parent_window(wd))) | ||||||
|  | 						place_ptr_->collocate(); | ||||||
|  | 				} | ||||||
| 			}); | 			}); | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| @ -1524,6 +1527,9 @@ namespace nana | |||||||
| 	private: | 	private: | ||||||
| 		void collocate(window wd) override | 		void collocate(window wd) override | ||||||
| 		{ | 		{ | ||||||
|  | 			if (API::is_destroying(wd)) | ||||||
|  | 				return; | ||||||
|  | 
 | ||||||
| 			if (splitter_.empty()) | 			if (splitter_.empty()) | ||||||
| 			{ | 			{ | ||||||
| 				splitter_.create(wd); | 				splitter_.create(wd); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Jinhao
						Jinhao