void LocationView::ShowPropertiesDlg() { LocationLayerPtr locationLayer; for (uint i = 0; i < App::Inst().GetLayerTreeController()->GetNumLocationLayers(); i++) { locationLayer = App::Inst().GetLayerTreeController()->GetLocationLayer(i); if (locationLayer->GetId() == m_locationLayerId) break; } if ( locationLayer->HasPropertiesDialogOpen() ) { locationLayer->GetPropertiesDialog()->SetFocus(); locationLayer->GetPropertiesDialog()->Raise(); } else { LocationPropertiesDlg* dlg = new LocationPropertiesDlg(App::Inst().GetMainWindow(), locationLayer); dlg->SetPage(LocationPropertiesDlg::SYMBOLOGY); dlg->Show(); dlg->SetFocus(); dlg->Raise(); locationLayer->SetPropertiesDialogOpenStatus( true ); } }
bool LocationSetLayer::RemoveLayer(uint id) { bool bFound = false; for(unsigned int index = 0; index < GetNumLocationLayers() && !bFound; index++) { LocationLayerPtr layer = GetLocationLayer(index); if(layer->GetId() == id) { RemoveLocationLayerByIndex(index); return true; } bFound = layer->RemoveLayer(id); } return bFound; }
LayerPtr LocationSetLayer::GetLayer(uint id) const { for(unsigned int index = 0; index < GetNumLocationLayers(); index++) { LocationLayerPtr layer = GetLocationLayer(index); if(layer->GetId() == id) return layer; LayerPtr returnLayer = layer->GetLayer(id); if(returnLayer != LayerPtr()) { return returnLayer; } } return LayerPtr(); }