File tree 1 file changed +0
-27
lines changed 1 file changed +0
-27
lines changed Original file line number Diff line number Diff line change @@ -274,33 +274,6 @@ def remove_selected_alias(self):
274
274
else :
275
275
self .alias_add_button .setFocus ()
276
276
277
- def keyPressEvent (self , event ): # noqa: N802
278
- if event .key () == Qt .Key_Return or event .key () == Qt .Key_Enter : # type: ignore
279
- focused_widget = QApplication .focusWidget ()
280
- if isinstance (focused_widget .parent (), TagAliasWidget ):
281
- self .add_alias_callback ()
282
-
283
- def remove_selected_alias (self ):
284
- count = self .aliases_flow_layout .count ()
285
- if count <= 0 :
286
- return
287
-
288
- focused_widget = QApplication .focusWidget ()
289
-
290
- if focused_widget is None :
291
- return
292
-
293
- if isinstance (focused_widget .parent (), TagAliasWidget ):
294
- cast (TagAliasWidget , focused_widget .parent ()).on_remove .emit ()
295
-
296
- count = self .aliases_flow_layout .count ()
297
- if count > 1 :
298
- cast (
299
- TagAliasWidget , self .aliases_flow_layout .itemAt (count - 2 ).widget ()
300
- ).text_field .setFocus ()
301
- else :
302
- self .alias_add_button .setFocus ()
303
-
304
277
def add_subtag_callback (self , tag_id : int ):
305
278
logger .info ("add_subtag_callback" , tag_id = tag_id )
306
279
self .subtag_ids .add (tag_id )
You can’t perform that action at this time.
0 commit comments