Skip to content

Commit

Permalink
Merge pull request #817 from YektaY/designer
Browse files Browse the repository at this point in the history
FIX: ignores the rule editor expression in qt designer
  • Loading branch information
jbellister-slac authored Apr 6, 2022
2 parents b84159e + 2e5ed56 commit 5edb3a4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 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_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 Expand Up @@ -219,6 +218,9 @@ def unregister(self, widget_ref):
del w_data

def run(self):
if is_qt_designer():
return

while not self.isInterruptionRequested():
w_map = self.widget_map.copy()
for widget_ref, rules in w_map.items():
Expand Down

0 comments on commit 5edb3a4

Please sign in to comment.