Open Arthur-Milchior opened 5 years ago
Hi @Arthur-Milchior, thanks for letting me know! Just quickly:
View → Night Mode → Choose what to style
may supress the issueCardLayout.__init__
from another function (like in run-time), or possibly hacking a way around and moving the logic elsewhere.Please, let me know if it helps - I am happy to assist you with finding a solution (though this month is though, expect delayed responses).
PS. I've just moved contents in your post around as originally the main text was collapsed in the "Details" section and therefore invisible.
There is a simple and dirty way to force the sorting. I can force my add-on to change the number of its folder, since the loading order is simply decided by the id of the add-on. But I prefer to avoid doing this, it may quickly become far too complicated for what it's worth.
The other solution would be to modify each class calling CardLayout(). Which means that the add-on may become incompatible in yet other way with other add-on, so I don't believe it's such a good idea. Thus, I guess I'll just let the add-on be incompatible and write a message on the Readme page.
I've never heard of metaclass. I've not yet read the whole python documentation. Thanks for letting me know it exists.
Thus, I guess I'll just let the add-on be incompatible and write a message on the Readme page.
Just out of curiosity, did disabling Card Layout in View → Night Mode → Choose what to style
help?
Problem description
Hi,
I'm the developper of the above-mentionned add-on. I received a bug report https://github.com/Arthur-Milchior/anki-fast-note-type-editor/issues/1 and the user realized it's a compatibility problem between your add-on and mine. I understand that the trouble is that, when night mode is turned on, aqt.clayout.CardLayout.init is redefined. We both redefine it, and of course, it starts to create trouble. However, I must admit I don't understand your code and would love to have an explanation about how it works. Then, I may hopefully either do a pull request to you, or change my code. My trouble is that I don't understand how aqt.clayout.CardLayout.init is changed. It seems that CardLayout is only used in CardLayoutStyler, which itself is never used anyone in your code.
Information about your Anki Setup
Version 2.1.7 (a6c34fd7) Qt 5.12.0 PyQt 5.11.3
Night Mode 2.2.3 OS: Ubuntu
If you have a compatibility problem with a specific add-on or add-ons, please paste the add-on page links below:
Backtrace (if any)