Skip to content

Commit

Permalink
made it so that inital value is not applied in designer for the rules…
Browse files Browse the repository at this point in the history
… editor. also removed unused libraries
  • Loading branch information
YektaY committed Apr 6, 2022
1 parent 3fe2c3f commit 2e5ed56
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pydm/widgets/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
import functools
import weakref

from qtpy.QtCore import QThread, QMutex, Signal, QMutexLocker
from qtpy.QtCore import QThread, QMutex, Signal
from qtpy.QtWidgets import QWidget, QApplication
from ..utilities import is_pydm_app, is_qt_designer
from ..utilities import is_qt_designer
from .channel import PyDMChannel

import pydm.data_plugins

import numpy as np
import math

Expand Down Expand Up @@ -190,7 +188,8 @@ def register(self, widget, rules):
value_slot=value_cb, enum_strings_slot=enums_cb)
item['channels'].append(c)
rules_db.append(item)
if initial_val:

if initial_val and not is_qt_designer():
self.emit_value(widget_ref, name, prop, initial_val)

if rules_db:
Expand Down

0 comments on commit 2e5ed56

Please sign in to comment.