Skip to content

Commit

Permalink
Merge pull request #1019 from PrimozGodec/topic-fix-recomputation
Browse files Browse the repository at this point in the history
[FIX] Topic Modelling - Do not recompute when spin value doesn't change
  • Loading branch information
ajdapretnar authored Nov 10, 2023
2 parents 64c4e25 + c82b4b4 commit 314c562
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions orangecontrib/text/widgets/owtopicmodeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,21 @@ def __init__(self, master, **kwargs):
self.model = self.create_model()
QVBoxLayout(self)
for parameter, description, minv, maxv, step, _type in self.parameters:
spin = gui.spin(self, self, parameter, minv=minv, maxv=maxv, step=step,
label=self.spin_format.format(description=description, parameter=parameter),
labelWidth=220, spinType=_type)
spin = gui.spin(
self,
self,
parameter,
minv=minv,
maxv=maxv,
step=step,
label=self.spin_format.format(
description=description, parameter=parameter
),
labelWidth=220,
spinType=_type,
callback=self.on_change,
)
spin.clearFocus()
spin.editingFinished.connect(self.on_change)

def on_change(self):
self.model = self.create_model()
Expand Down

0 comments on commit 314c562

Please sign in to comment.