mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
"Highlight Continuity Area" mode improvements
This commit is contained in:
@@ -125,10 +125,13 @@ public interface IPlugInPort extends ISelectionProcessor, IMouseProcessor, IKeyP
|
||||
*
|
||||
* Note: point coordinates are scaled for zoom factor.
|
||||
*
|
||||
* @param point
|
||||
* @param point
|
||||
* @param ctrlDown
|
||||
* @param shiftDown
|
||||
* @param altDown
|
||||
* @return cursor
|
||||
*/
|
||||
Cursor getCursorAt(Point point);
|
||||
Cursor getCursorAt(Point point, boolean ctrlDown, boolean shiftDown, boolean altDown);
|
||||
|
||||
/**
|
||||
* Returns an instance of currently loaded project.
|
||||
|
||||
@@ -470,8 +470,7 @@ public class DrawingManager {
|
||||
}
|
||||
}
|
||||
|
||||
if (currentContinuityArea != null
|
||||
&& (configManager.readBoolean(IPlugInPort.HIGHLIGHT_CONTINUITY_AREA, false))) {
|
||||
if (currentContinuityArea != null) {
|
||||
Composite oldComposite = g2d.getComposite();
|
||||
g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.5f));
|
||||
g2d.setColor(Color.green);
|
||||
|
||||
@@ -265,9 +265,9 @@ public class Presenter implements IPlugInPort {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Cursor getCursorAt(Point point) {
|
||||
public Cursor getCursorAt(Point point, boolean ctrlDown, boolean shiftDown, boolean altDown) {
|
||||
// Only change the cursor if we're not making a new component.
|
||||
if (configManager.readBoolean(HIGHLIGHT_CONTINUITY_AREA, false))
|
||||
if (configManager.readBoolean(HIGHLIGHT_CONTINUITY_AREA, false) || altDown)
|
||||
return Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR);
|
||||
if (instantiationManager.getComponentTypeSlot() == null) {
|
||||
// Scale point to remove zoom factor.
|
||||
@@ -686,7 +686,7 @@ public class Presenter implements IPlugInPort {
|
||||
drawingManager.clearContinuityArea();
|
||||
projectFileManager.notifyFileChange();
|
||||
}
|
||||
} else if (configManager.readBoolean(HIGHLIGHT_CONTINUITY_AREA, false)) {
|
||||
} else if (configManager.readBoolean(HIGHLIGHT_CONTINUITY_AREA, false) || altDown) {
|
||||
drawingManager.findContinuityAreaAtPoint(currentProject, scaledPoint);
|
||||
messageDispatcher.dispatchMessage(EventType.REPAINT);
|
||||
} else {
|
||||
@@ -717,6 +717,7 @@ public class Presenter implements IPlugInPort {
|
||||
newSelection.addAll(findAllGroupedComponents(topComponent));
|
||||
}
|
||||
}
|
||||
drawingManager.clearContinuityArea();
|
||||
updateSelection(newSelection);
|
||||
// messageDispatcher.dispatchMessage(EventType.SELECTION_CHANGED,
|
||||
// selectedComponents);
|
||||
|
||||
@@ -3130,6 +3130,14 @@
|
||||
<changeType>NEW_FEATURE</changeType>
|
||||
<description>Added German UI translation</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>NEW_FEATURE</changeType>
|
||||
<description>Use ALT key to temporarily switch to "Highlight Continuity Area" mode</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>IMPROVEMENT</changeType>
|
||||
<description>Reset "Highlight Continuity Area" mode configuration on application exit to avoid confusion in the next session</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>IMPROVEMENT</changeType>
|
||||
<description>Improved Dutch translation</description>
|
||||
|
||||
Reference in New Issue
Block a user