Refactoring

This commit is contained in:
elasota
2020-01-05 16:41:04 -05:00
parent 1fba6f9e85
commit 645a997c7a
18 changed files with 174 additions and 186 deletions

View File

@@ -12,6 +12,7 @@
#include "Environ.h"
#include "FontFamily.h"
#include "House.h"
#include "InputManager.h"
#include "MenuManager.h"
#include "RectUtils.h"
#include "PLKeyEncoding.h"
@@ -378,7 +379,6 @@ void UpdateEditWindowTitle (void)
void HandleMainClick (Point wherePt, Boolean isDoubleClick)
{
KeyDownStates theseKeys;
if ((theMode != kEditMode) || (mainWindow == nil) ||
(!houseUnlocked))
@@ -393,9 +393,10 @@ void HandleMainClick (Point wherePt, Boolean isDoubleClick)
DoSelectionClick(mainWindowSurface, wherePt, isDoubleClick);
else
DoNewObjectClick(wherePt);
GetKeys(theseKeys);
if (!BitTst(theseKeys, PL_KEY_EITHER_SPECIAL(kShift)))
const KeyDownStates *theseKeys = PortabilityLayer::InputManager::GetInstance()->GetKeys();
if (!theseKeys->IsSet(PL_KEY_EITHER_SPECIAL(kShift)))
{
EraseSelectedTool();
SelectTool(kSelectTool);