add comment

This commit is contained in:
RickyRister 2025-01-19 20:22:28 -08:00
parent 57cea844b1
commit d03be7eba5

View file

@ -82,6 +82,11 @@ void CardInfoFrameWidget::setViewMode(int mode)
if (currentIndex() != mode)
setCurrentIndex(mode);
/* This weird code is to work around the following:
* - Widgets can only have one parent; adding an already-parented widget will cause the new parent to "steal" it
* from the old parent
* - Unparented widgets become freefloating, which we do not want
*/
switch (mode) {
case ImageOnlyView:
case TextOnlyView: