Skip to content

Commit

Permalink
Update space charge button reference
Browse files Browse the repository at this point in the history
  • Loading branch information
proy30 committed Feb 25, 2025
1 parent fd6998a commit 1237fce
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from ... import setup_server
from .. import generalFunctions

from .. import CardComponents
server, state, ctrl = setup_server()

# -----------------------------------------------------------------------------
Expand All @@ -17,6 +17,16 @@


class SpaceChargeFunctions:

@staticmethod
def multigrid_settings():
CardComponents.card_button(
"mdi-cog",
color="secondary",
click="space_charge_dialog_settings = true",
v_if="poisson_solver == 'multigrid'",
)

@staticmethod
def validate_prob_relative_fields(index, prob_relative_value):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,6 @@ def on_update_prob_relative_call(index, value):
# -----------------------------------------------------------------------------


def multigrid_settings():
vuetify.VIcon(
"mdi-cog",
v_if="poisson_solver == 'multigrid'",
click="space_charge_dialog_settings = true",
)


class SpaceChargeConfiguration(CardBase):
HEADER_NAME = "Space Charge"

Expand All @@ -193,7 +185,7 @@ def card_content(self):

with vuetify.VCard(style=self.collapsable):
CardComponents.input_header(
self.HEADER_NAME, additional_components={"start": multigrid_settings}
self.HEADER_NAME, additional_components={"start": SpaceChargeFunctions.multigrid_settings}
)
with vuetify.VCardText(**self.CARD_TEXT_OVERFLOW):
with vuetify.VRow(**self.ROW_STYLE):
Expand Down

0 comments on commit 1237fce

Please sign in to comment.