mirror of
				https://github.com/ArthurSonzogni/FTXUI.git
				synced 2025-11-04 13:38:14 +08:00 
			
		
		
		
	Table: reset dimensions. (#396)
The table is not meant to be used to render more than once. Reset the dimensions so that, even if it is used wrongly, this is not memory unsafe. This was raised by: https://github.com/ArthurSonzogni/FTXUI/issues/381
This commit is contained in:
		@@ -174,6 +174,8 @@ Element Table::Render() {
 | 
			
		||||
      it = std::move(it) | size(WIDTH, EQUAL, 0) | size(HEIGHT, EQUAL, 0);
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  dim_x_ = 0;
 | 
			
		||||
  dim_y_ = 0;
 | 
			
		||||
  return gridbox(std::move(elements_));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user