MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / removeTab

Method removeTab

src/bzflag/ControlPanel.cpp:1223–1244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1221
1222
1223bool ControlPanel::removeTab(const std::string& label) {
1224 for (int t = 0; t < (int)tabs.size(); t++) {
1225 Tab* tab = tabs[t];
1226 if (tab->label == label) { // an exact test, not using getTabID()
1227 if (tab->locked) {
1228 return false;
1229 }
1230 delete tab;
1231 tabs.erase(tabs.begin() + t);
1232 setupTabMap();
1233 if (activeTab >= (int)tabs.size()) {
1234 setActiveTab(MessageAll);
1235 }
1236 resize();
1237 if (hubLink) {
1238 hubLink->tabRemoved(label);
1239 }
1240 return true;
1241 }
1242 }
1243 return false;
1244}
1245
1246
1247bool ControlPanel::renameTab(const std::string& oldLabel,

Callers 6

clearMethod · 0.45
keyPressMethod · 0.45
RemoveTabMethod · 0.45
keyPressMethod · 0.45
operator()Method · 0.45
RemoveTabMethod · 0.45

Calls 4

resizeFunction · 0.50
sizeMethod · 0.45
beginMethod · 0.45
tabRemovedMethod · 0.45

Tested by

no test coverage detected