eric6/WebBrowser/OpenSearch/OpenSearchDialog.py

changeset 8260
2161475d9639
parent 8218
7c09585bd960
equal deleted inserted replaced
8259:2bbec88047dd 8260:2161475d9639
94 Private slot to edit the data of the current search engine. 94 Private slot to edit the data of the current search engine.
95 """ 95 """
96 from .OpenSearchEditDialog import OpenSearchEditDialog 96 from .OpenSearchEditDialog import OpenSearchEditDialog
97 97
98 rows = self.enginesTable.selectionModel().selectedRows() 98 rows = self.enginesTable.selectionModel().selectedRows()
99 if len(rows) == 0: 99 row = (
100 row = self.enginesTable.selectionModel().currentIndex().row() 100 self.enginesTable.selectionModel().currentIndex().row()
101 else: 101 if len(rows) == 0 else
102 row = rows[0].row() 102 rows[0].row()
103 )
103 104
104 osm = self.__mw.openSearchManager() 105 osm = self.__mw.openSearchManager()
105 engineName = osm.allEnginesNames()[row] 106 engineName = osm.allEnginesNames()[row]
106 engine = osm.engine(engineName) 107 engine = osm.engine(engineName)
107 dlg = OpenSearchEditDialog(engine, self) 108 dlg = OpenSearchEditDialog(engine, self)

eric ide

mercurial