Annotations: fix matchFunc (#13037)
Compare only datetime and start/end positions, it's enough. Closes #13030.
This commit is contained in:
1 parent
9b444cba89
commit
5cd9494ae9
1 file changed
+1
-3
@@ -350,8 +350,7 @@ function ReaderAnnotation:getMatchFunc()
|
||||
if self.ui.rolling then
|
||||
doesMatch = function(a, b)
|
||||
if (a.datetime ~= nil and b.datetime ~= nil and a.datetime ~= b.datetime)
|
||||
or (not a.drawer) ~= (not b.drawer)
|
||||
or a.page ~= b.page
|
||||
or a.pos0 ~= b.pos0
|
||||
or a.pos1 ~= b.pos1 then
|
||||
return false
|
||||
end
|
||||
@@ -360,7 +359,6 @@ function ReaderAnnotation:getMatchFunc()
|
||||
else
|
||||
doesMatch = function(a, b)
|
||||
if (a.datetime ~= nil and b.datetime ~= nil and a.datetime ~= b.datetime)
|
||||
or (not a.drawer) ~= (not b.drawer)
|
||||
or a.page ~= b.page
|
||||
or (a.pos0 and (a.pos0.x ~= b.pos0.x or a.pos1.x ~= b.pos1.x
|
||||
or a.pos0.y ~= b.pos0.y or a.pos1.y ~= b.pos1.y)) then
|
||||
|
||||
Reference in new issue
Block a user