mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 11:20:05 +00:00 
			
		
		
		
	First pass fixes from discussions. Mostly linter fixes
This commit is contained in:
		
							parent
							
								
									91b4d6c2c2
								
							
						
					
					
						commit
						dc284974b3
					
				
					 14 changed files with 107 additions and 74 deletions
				
			
		|  | @ -219,7 +219,7 @@ public: | |||
|    std::shared_ptr<model::LayerModel> layerModel_ { | ||||
|       model::LayerModel::Instance()}; | ||||
| 
 | ||||
|    std::shared_ptr<ui::EditMarkerDialog> editMarkerDialog_; | ||||
|    ui::EditMarkerDialog* editMarkerDialog_; | ||||
| 
 | ||||
|    std::shared_ptr<manager::HotkeyManager> hotkeyManager_ { | ||||
|       manager::HotkeyManager::Instance()}; | ||||
|  | @ -286,7 +286,10 @@ MapWidget::MapWidget(std::size_t id, const QMapLibre::Settings& settings) : | |||
| 
 | ||||
|    ImGui_ImplQt_RegisterWidget(this); | ||||
| 
 | ||||
|    p->editMarkerDialog_ = std::make_shared<ui::EditMarkerDialog>(this); | ||||
|    // Qt parent deals with memory management
 | ||||
|    // NOLINTNEXTLINE(cppcoreguidelines-owning-memory)
 | ||||
|    p->editMarkerDialog_ = new ui::EditMarkerDialog(this); | ||||
| 
 | ||||
|    p->ConnectSignals(); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -77,9 +77,21 @@ void MarkerLayer::Impl::ReloadMarkers() | |||
|          const std::shared_ptr<gl::draw::GeoIconDrawItem> icon = | ||||
|             geoIcons_->AddIcon(); | ||||
| 
 | ||||
|          const std::string latitudeString = | ||||
|             common::GetLatitudeString(marker.latitude); | ||||
|          const std::string longitudeString = | ||||
|             common::GetLongitudeString(marker.longitude); | ||||
| 
 | ||||
|          const std::string hoverText = | ||||
|             marker.name != "" ? | ||||
|                fmt::format( | ||||
|                   "{}\n{}, {}", marker.name, latitudeString, longitudeString) : | ||||
|                fmt::format("{}, {}", latitudeString, longitudeString); | ||||
| 
 | ||||
| 
 | ||||
|          geoIcons_->SetIconTexture(icon, marker.iconName, 0); | ||||
|          geoIcons_->SetIconLocation(icon, marker.latitude, marker.longitude); | ||||
|          geoIcons_->SetIconHoverText(icon, marker.name); | ||||
|          geoIcons_->SetIconHoverText(icon, hoverText); | ||||
|          geoIcons_->SetIconModulate(icon, marker.iconColor); | ||||
|          geoIcons_->RegisterEventHandler( | ||||
|             icon, | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 AdenKoperczak
						AdenKoperczak