diff options
| author | BossCode45 <human.cyborg42@gmail.com> | 2022-08-25 21:02:20 +1200 |
|---|---|---|
| committer | BossCode45 <human.cyborg42@gmail.com> | 2022-08-25 21:02:20 +1200 |
| commit | 1566509dc6c3a7b6b579c0088f627786b73ee6a6 (patch) | |
| tree | df112cbff06287ab151ec316a61b800062ac189c | |
| parent | 827bea259f257e99d108a061ed7bc0d991974f4a (diff) | |
| download | YATwm-1566509dc6c3a7b6b579c0088f627786b73ee6a6.tar.gz YATwm-1566509dc6c3a7b6b579c0088f627786b73ee6a6.zip | |
Frame disolving for wToWS
| -rw-r--r-- | main.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -119,6 +119,25 @@ void wToWS(const KeyArg arg) if(pSF[i] == fID) { pSF.erase(pSF.begin() + i); + int pID = frames.find(fID)->second.pID; + if(pSF.size() < 2 && !frames.find(pID)->second.isRoot) + { + //Erase parent frame + int lastChildID = frames.find(frames.find(pID)->second.subFrameIDs[0])->second.ID; + int parentParentID = frames.find(pID)->second.pID; + vector<int>& parentParentSubFrameIDs = frames.find(parentParentID)->second.subFrameIDs; + for(int j = 0; j < parentParentSubFrameIDs.size(); j++) + { + if(parentParentSubFrameIDs[j] == pID) + { + parentParentSubFrameIDs[j] = lastChildID; + frames.find(lastChildID)->second.pID = parentParentID; + frames.erase(pID); + break; + } + } + } + break; } } |
