Skip to content

Commit 9af2d65

Browse files
committed
Create Class: Minor fixes
1 parent 3cedb3a commit 9af2d65

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Orange/widgets/data/owcreateclass.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def __init__(self):
174174
self.rules_box = rules_box = QGridLayout()
175175
patternbox.layout().addLayout(self.rules_box)
176176
self.add_button = gui.button(None, self, "+", flat=True,
177-
callback=self.add_row,
177+
callback=self.add_row, autoDefault=False,
178178
minimumSize=QSize(12, 20))
179179
self.rules_box.setColumnMinimumWidth(1, 80)
180180
self.rules_box.setColumnMinimumWidth(0, 10)
@@ -260,7 +260,7 @@ def _add_line():
260260
None, self, label='×', flat=True, height=20,
261261
styleSheet='* {font-size: 16pt; color: silver}'
262262
'*:hover {color: black}',
263-
callback=self.remove_row)
263+
autoDefault=False, callback=self.remove_row)
264264
button.setMinimumSize(QSize(12, 20))
265265
self.remove_buttons.append(button)
266266
self.rules_box.addWidget(button, n_lines, 0)
@@ -322,7 +322,7 @@ def _matcher(strings, pattern):
322322
are fixed on the fly."""
323323
if not self.case_sensitive:
324324
pattern = pattern.lower()
325-
indices = np.char.find(strings, pattern)
325+
indices = np.char.find(strings, pattern.strip())
326326
return indices == 0 if self.match_beginning else indices != -1
327327

328328
def _lower_if_needed(strings):

0 commit comments

Comments
 (0)