-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Zone: Step towards zones not bound to a single node (#43)
Remaining stumble points: - AutoAction: Based on controlID - Context: Based on nodes
- Loading branch information
1 parent
45f0e8b
commit 0d4ebd0
Showing
3 changed files
with
128 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ | |
|
||
|
||
|
||
__version__ = "2024.07.19" | ||
__version__ = "2024.07.25" | ||
__authors__ = ( | ||
"Shirley Noël <[email protected]>", | ||
"Julien Cochuyt <[email protected]>", | ||
|
@@ -615,7 +615,7 @@ def initData(self, context): | |
rule = result.rule | ||
if ( | ||
rule.type in (ruleTypes.PARENT, ruleTypes.ZONE) | ||
and node in result.node | ||
and result.containsNode(node) | ||
): | ||
parents.insert(0, rule.name) | ||
self.contextParentCombo.Set(parents) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ | |
WebAccess overlay classes | ||
""" | ||
|
||
__version__ = "2021.03.12" | ||
__version__ = "2024.07.24" | ||
__author__ = "Julien Cochuyt <[email protected]>" | ||
|
||
|
||
|
@@ -505,10 +505,10 @@ def _caretMovementScriptHelper( | |
msg += _("Press escape to cancel zone restriction.") | ||
ui.message(msg) | ||
if posConstant == textInfos.POSITION_FIRST: | ||
pos = zone.startOffset | ||
pos = zone.result.startOffset | ||
posConstant = textInfos.offsets.Offsets(pos, pos) | ||
elif posConstant == textInfos.POSITION_LAST: | ||
pos = max(zone.endOffset - 1, zone.startOffset) | ||
pos = max(zone.result.endOffset - 1, zone.result.startOffset) | ||
posConstant = textInfos.offsets.Offsets(pos, pos) | ||
super()._caretMovementScriptHelper( | ||
gesture, | ||
|
@@ -557,12 +557,12 @@ def _iterNodesByType(self, itemType, direction="next", pos=None): | |
direction | ||
): | ||
if zone: | ||
if item.textInfo._startOffset < zone.startOffset: | ||
if item.textInfo._startOffset < zone.result.startOffset: | ||
if direction == "next": | ||
continue | ||
else: | ||
return | ||
elif item.textInfo._startOffset >= zone.endOffset: | ||
elif item.textInfo._startOffset >= zone.result.endOffset: | ||
if direction == "previous": | ||
continue | ||
else: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters