| 29 | //------------------------------------------------------------------------------ |
| 30 | |
| 31 | void SelectAction::process(Selection * sel, const Gui3DMouseEvent & event, bool selChanged, Type type) |
| 32 | { |
| 33 | if(sel == mTerrainEditor->getCurrentSel()) |
| 34 | return; |
| 35 | |
| 36 | if(type == Process) |
| 37 | return; |
| 38 | |
| 39 | if(selChanged) |
| 40 | { |
| 41 | if(event.modifier & SI_MULTISELECT) |
| 42 | { |
| 43 | for(U32 i = 0; i < sel->size(); i++) |
| 44 | mTerrainEditor->getCurrentSel()->remove((*sel)[i]); |
| 45 | } |
| 46 | else |
| 47 | { |
| 48 | for(U32 i = 0; i < sel->size(); i++) |
| 49 | { |
| 50 | GridInfo gInfo; |
| 51 | if(mTerrainEditor->getCurrentSel()->getInfo((*sel)[i].mGridPoint.gridPos, gInfo)) |
| 52 | { |
| 53 | if(!gInfo.mPrimarySelect) |
| 54 | gInfo.mPrimarySelect = (*sel)[i].mPrimarySelect; |
| 55 | |
| 56 | if(gInfo.mWeight < (*sel)[i].mWeight) |
| 57 | gInfo.mWeight = (*sel)[i].mWeight; |
| 58 | |
| 59 | mTerrainEditor->getCurrentSel()->setInfo(gInfo); |
| 60 | } |
| 61 | else |
| 62 | mTerrainEditor->getCurrentSel()->add((*sel)[i]); |
| 63 | } |
| 64 | } |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | void DeselectAction::process(Selection * sel, const Gui3DMouseEvent & event, bool selChanged, Type type) |
| 69 | { |
nothing calls this directly
no test coverage detected