View Single Post
Old 11-22-2020, 04:42 PM   #25
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,092
Karma: 1948136
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by ownedbycats View Post
Example:

1. I have a column icon rule set to display an icon if the Languages field is empty.
2. If I use Action Chains to set the Language field, the icon doesn't immediately disappear. This is a common glitch when plugins change the metadata.
3. So I use "Re-apply current sort" (a default Calibre action, in the Keyboard Shortcuts) and the icons will refresh.
Ahh, I got it. The plugin should probably refresh the gui after running the chain. I will add this to next release, and see if it solves your problems.

Was not aware of the re-apply sort trick. If you want an action that does that, try this custom action. (Manage modules > create module > copy paste in the module editor, and give the module a name)

Code:
from calibre_plugins.action_chains.actions.base import ChainAction

class ResortAction(ChainAction):

    name = 'Re-sort'

    def run(self, gui, settings, chain):
        gui.current_view().resort()

Last edited by capink; 03-23-2021 at 01:27 PM.
capink is offline   Reply With Quote