diff --git a/cockatrice/src/client/ui/widgets/cards/card_info_frame_widget.cpp b/cockatrice/src/client/ui/widgets/cards/card_info_frame_widget.cpp index fb6075124..ab197b801 100644 --- a/cockatrice/src/client/ui/widgets/cards/card_info_frame_widget.cpp +++ b/cockatrice/src/client/ui/widgets/cards/card_info_frame_widget.cpp @@ -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: