Bug fixes

This commit is contained in:
Stowen 2018-08-27 01:21:59 +08:00
parent 9ab03a655d
commit 9d9f4337ca
7 changed files with 9 additions and 5 deletions

View File

@ -18,9 +18,10 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from anki.hooks import addHook
from anki.utils import isMac
############## other config here ##################
shortcut = 'Ctrl+Q'
shortcut = ('Ctrl+Alt' if isMac else 'Ctrl') + '+Q'
###################################################
def start_here():

View File

@ -126,7 +126,7 @@ def context_menu():
"""
add context menu to webview
"""
submenu = menu.addMenu('FastWQ')
submenu = menu.addMenu(_('QUERY'))
submenu.addAction(_('ALL_FIELDS'), lambda: query_from_editor_fields(web_view.editor), QKeySequence(my_shortcut))
submenu.addAction(_('CURRENT_FIELDS'),
lambda: query_from_editor_fields(

View File

@ -76,6 +76,7 @@ class ProgressWindow(object):
)
self._update(label=number_info, value=words_number+skips_number+fails_number)
self._win.adjustSize()
self.app.processEvents()
def update_title(self, title):
if self.abort():

View File

@ -86,6 +86,7 @@ def query_from_editor_fields(editor, fields=None):
fields
)
else:
editor.setNote(editor.note)
query_all([editor.note], flush, fields)
editor.setNote(editor.note, focus=True)
editor.saveNow()

View File

@ -18,10 +18,10 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from anki.hooks import addHook
from anki.utils import isMac
############## other config here ##################
shortcut = 'Ctrl+Q'
shortcut = ('Ctrl+Alt' if isMac else 'Ctrl') + '+Q'
###################################################

View File

@ -126,7 +126,7 @@ def context_menu():
"""
add context menu to webview
"""
submenu = menu.addMenu('FastWQ')
submenu = menu.addMenu(_('QUERY'))
submenu.addAction(_('ALL_FIELDS'), lambda: query_from_editor_fields(web_view.editor), QKeySequence(my_shortcut))
submenu.addAction(_('CURRENT_FIELDS'),
lambda: query_from_editor_fields(

View File

@ -76,6 +76,7 @@ class ProgressWindow(object):
)
self._update(label=number_info, value=words_number+skips_number+fails_number)
self._win.adjustSize()
self.app.processEvents()
def update_title(self, title):
if self.abort():