void ChildAlias::mouseUp (const MouseEvent& e) { ((CabbageMainPanel*)(getTarget()->getParentComponent()))->setMouseState("up"); if (e.eventComponent == resizer) { } else { //add this to reset MainComponent to have keyboard focus so that keyboard shortcuts (eg. lock/unlock) still work / intercept the messages getTopLevelComponent()->getChildComponent(0)->grabKeyboardFocus(); } if (userAdjusting) userStoppedChangingBounds (); userAdjusting = false; int offX = getProperties().getWithDefault(var::identifier("plantX"), 0); int offY = getProperties().getWithDefault(var::identifier("plantY"), 0); //update dimensions ((CabbageMainPanel*)(getTarget()->getParentComponent()))->currentBounds.setBounds(getPosition().getX()-offX, getPosition().getY()-offY, getWidth(), getHeight()); applyToTarget(""); ((CabbageMainPanel*)(getTarget()->getParentComponent()))->sendActionMessage("Message sent from CabbageMainPanel:Up"); if(type.containsIgnoreCase("CabbageGroupbox")|| type.containsIgnoreCase("CabbageImage")) toBack(); else toFront(true); }
void ChildAlias::mouseUp (const MouseEvent& e) { if (e.eventComponent == resizer) { } else { } if (userAdjusting) userStoppedChangingBounds (); userAdjusting = false; }
void ComponentOverlay::mouseUp (const MouseEvent& e) { if (e.eventComponent != resizer) { //add this to reset MainComponent to have keyboard focus so that keyboard shortcuts (eg. lock/unlock) still work / intercept the messages getTopLevelComponent()->getChildComponent (0)->grabKeyboardFocus(); } if (userAdjusting) userStoppedChangingBounds (); userAdjusting = false; layoutEditor->getLassoSelection().addToSelectionOnMouseUp (this, e.mods, true, mouseDownSelectStatus); layoutEditor->updateSelectedComponentBounds(); updateBoundsDataForTarget(); }