Skip to content

Commit 5aa915a

Browse files
Refactor FrameFilter to update class inheritance and introduce introduce_to_viewmodel method for improved view model integration.
1 parent 9bb468f commit 5aa915a

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

OTAnalytics/plugin_ui/customtkinter_gui/frame_filter.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
from OTAnalytics.adapter_ui.view_model import ViewModel
2727
from OTAnalytics.application.logger import logger
2828
from OTAnalytics.domain.date import DateRange
29+
from OTAnalytics.plugin_ui.customtkinter_gui.abstract_ctk_frame import AbstractCTkFrame
2930
from OTAnalytics.plugin_ui.customtkinter_gui.constants import (
3031
PADX,
3132
PADY,
@@ -63,7 +64,7 @@ class InvalidDatetimeFormatError(Exception):
6364
pass
6465

6566

66-
class FrameFilter(AbstractFrameFilter, EmbeddedCTkFrame):
67+
class FrameFilter(AbstractCTkFrame, AbstractFrameFilter):
6768
def __init__(self, viewmodel: ViewModel, **kwargs: Any) -> None:
6869
super().__init__(**kwargs)
6970
self._viewmodel = viewmodel
@@ -117,6 +118,9 @@ def reset(self) -> None:
117118
def _introduce_to_viewmodel(self) -> None:
118119
self._viewmodel.set_filter_frame(self)
119120

121+
def introduce_to_viewmodel(self) -> None:
122+
self._introduce_to_viewmodel()
123+
120124
def set_active_color_on_filter_by_date_button(self) -> None:
121125
self.filter_by_date_button.set_color(COLOR_ORANGE)
122126

0 commit comments

Comments
 (0)