Skip to content

Commit 085a1e7

Browse files
committed
fix copy -- apparently some interface in NVDA changed
1 parent 4b3b1fa commit 085a1e7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

NVDA-addon/addon/globalPlugins/MathCAT/MathCAT.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,10 @@ def _copyToClipAsMathML(self, text: str, notify: Optional[bool] = False) -> bool
237237
if not isinstance(text, str) or len(text) == 0:
238238
return False
239239
from api import getClipData
240-
from mainFrame import Handle
240+
import gui
241+
241242
try:
242-
with winUser.openClipboard(Handle):
243+
with winUser.openClipboard(gui.mainFrame.Handle):
243244
winUser.emptyClipboard()
244245
self._setClipboardData(self.CF_MathML, self._wrapMathMLForClipBoard(text))
245246
self._setClipboardData(self.CF_MathML_Presentation, self._wrapMathMLForClipBoard(text))

0 commit comments

Comments
 (0)