mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 03:50:05 +00:00 
			
		
		
		
	Remove "Improve this map" where HTML links cannot be shown
This commit is contained in:
		
							parent
							
								
									8af480198b
								
							
						
					
					
						commit
						54e85e981b
					
				
					 1 changed files with 10 additions and 2 deletions
				
			
		|  | @ -30,6 +30,8 @@ | |||
| 
 | ||||
| #include <backends/imgui_impl_opengl3.h> | ||||
| #include <backends/imgui_impl_qt.hpp> | ||||
| #include <boost/algorithm/string/erase.hpp> | ||||
| #include <boost/algorithm/string/trim.hpp> | ||||
| #include <boost/asio/post.hpp> | ||||
| #include <boost/asio/thread_pool.hpp> | ||||
| #include <boost/uuid/random_generator.hpp> | ||||
|  | @ -263,8 +265,14 @@ void MapWidgetImpl::ConnectMapSignals() | |||
|            { | ||||
|               QTextDocument document {}; | ||||
|               document.setHtml(copyrightsHtml); | ||||
|               context_->set_map_copyrights( | ||||
|                  document.toPlainText().toStdString()); | ||||
| 
 | ||||
|               // HTML cannot currently be included in ImGui windows. Where links
 | ||||
|               // can't be included, remove "Improve this map".
 | ||||
|               std::string copyrights {document.toPlainText().toStdString()}; | ||||
|               boost::erase_all(copyrights, "Improve this map"); | ||||
|               boost::trim_right(copyrights); | ||||
| 
 | ||||
|               context_->set_map_copyrights(copyrights); | ||||
|            }); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat