Skip to content

Commit

Permalink
MAINT: integrate pyaedt PR 3890 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
SMoraisAnsys committed Nov 29, 2023
1 parent 636ce36 commit 4e2d999
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions src/pyedb/legacy/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 pyedb.legacy.edb_core.edb_data.simulation_setup import BaseSimulationSetup
from pyedb.legacy.edb_core.general import convert_netdict_to_pydict
from pyedb.legacy.edb_core.general import convert_pydict_to_netdict
Expand Down Expand Up @@ -996,11 +998,13 @@ def set_pi_slider(self, value):
- ``0``: Optimal speed
- ``1``: Balanced
- ``2``: Optimal accuracy
.. deprecated:: 0.7.5
Use :property:`pi_slider_position` property instead.
"""
self.use_si_settings = False
self.use_custom_settings = False
warnings.warn("`set_pi_slider` is deprecated. Use `pi_slider_position` property instead.", DeprecationWarning)
self.pi_slider_position = value
self.advanced_settings.set_pi_slider(value)

@pyedb_function_handler
def set_si_slider(self, value):
Expand All @@ -1027,9 +1031,13 @@ 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``."""
"""SI slider position. Values are from ``1`` to ``3``."""
return self.get_sim_setup_info.SimulationSettings.SISliderPos

@si_slider_position.setter
Expand All @@ -1039,6 +1047,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 4e2d999

Please sign in to comment.