Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ring630 committed Nov 17, 2023
1 parent e44a1cd commit 989d279
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions pyaedt/edb_core/edb_data/siwave_simulation_setup_data.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import warnings

from pyaedt.edb_core.edb_data.simulation_setup import BaseSimulationSetup
from pyaedt.edb_core.general import convert_netdict_to_pydict
from pyaedt.edb_core.general import convert_pydict_to_netdict
Expand Down Expand Up @@ -1005,11 +1007,13 @@ def set_pi_slider(self, value):
- ``0``: Optimal speed
- ``1``: Balanced
- ``2``: Optimal accuracy
.. deprecated:: 0.7.5
Use :property:`pi_slider_position` method instead.
"""
self.use_si_settings = False
self.use_custom_settings = False
warnings.warn("`set_pi_slider` is deprecated. Use `pi_slider_position` method instead.", DeprecationWarning)
self.pi_slider_position = value
self.advanced_settings.set_pi_slider(value)

@pyaedt_function_handler
def set_si_slider(self, value):
Expand All @@ -1020,11 +1024,14 @@ def set_si_slider(self, value):
- ``0``: Optimal speed
- ``1``: Balanced
- ``2``: Optimal accuracy```
.. deprecated:: 0.7.5
Use :property:`si_slider_position` method instead.
"""
self.use_si_settings = True
self.use_custom_settings = False
warnings.warn("`set_si_slider` is deprecated. Use `si_slider_position` method instead.", DeprecationWarning)

self.si_slider_position = value
self.advanced_settings.set_si_slider(value)

@property
def pi_slider_position(self):
Expand All @@ -1038,6 +1045,10 @@ def pi_slider_position(self, value):
self._edb_object = self._set_edb_setup_info(edb_setup_info)
self._update_setup()

self.use_si_settings = False
self.use_custom_settings = False
self.advanced_settings.set_pi_slider(value)

@property
def si_slider_position(self):
"""SI solider position. Values are from ``1`` to ``3``."""
Expand All @@ -1050,6 +1061,10 @@ def si_slider_position(self, value):
self._edb_object = self._set_edb_setup_info(edb_setup_info)
self._update_setup()

self.use_si_settings = True
self.use_custom_settings = False
self.advanced_settings.set_si_slider(value)

@property
def use_custom_settings(self):
"""Custom settings to use.
Expand Down

0 comments on commit 989d279

Please sign in to comment.