MACVENTURE: Some more refactoring
This commit is contained in:
parent
4e3daab04f
commit
580c8136f4
1 changed files with 5 additions and 6 deletions
|
@ -761,18 +761,17 @@ void MacVentureEngine::highlightExit(ObjID objID) {
|
||||||
void MacVentureEngine::selectPrimaryObject(ObjID objID) {
|
void MacVentureEngine::selectPrimaryObject(ObjID objID) {
|
||||||
if (objID == _destObject) return;
|
if (objID == _destObject) return;
|
||||||
int idx;
|
int idx;
|
||||||
|
debugC(5, kMVDebugMain, "Select primary object (%d)", objID);
|
||||||
if (_destObject > 0 &&
|
if (_destObject > 0 &&
|
||||||
(idx = findObjectInArray(_destObject, _selectedObjs)) != -1 &&
|
(idx = findObjectInArray(_destObject, _selectedObjs)) != -1 &&
|
||||||
findObjectInArray(_destObject, _currentSelection) == -1)
|
findObjectInArray(_destObject, _currentSelection) == -1) {
|
||||||
{
|
unselectAll();
|
||||||
_selectedObjs.remove_at(idx);
|
|
||||||
highlightExit(_destObject);
|
|
||||||
}
|
}
|
||||||
_destObject = objID;
|
_destObject = objID;
|
||||||
if (findObjectInArray(_destObject, _selectedObjs) == -1) {
|
if (findObjectInArray(_destObject, _selectedObjs) == -1) {
|
||||||
_selectedObjs.push_back(_destObject);
|
selectObject(_destObject);
|
||||||
highlightExit(_destObject);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_cmdReady = true;
|
_cmdReady = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue