134 Private method to handle the wizards action. |
134 Private method to handle the wizards action. |
135 """ |
135 """ |
136 editor = e5App().getObject("ViewManager").activeWindow() |
136 editor = e5App().getObject("ViewManager").activeWindow() |
137 |
137 |
138 if editor is None: |
138 if editor is None: |
139 E5MessageBox.critical( |
139 E5MessageBox.critical( |
140 self.__ui, |
140 self.__ui, |
141 self.tr('No current editor'), |
141 self.tr('No current editor'), |
142 self.tr('Please open or create a file first.')) |
142 self.tr('Please open or create a file first.')) |
143 else: |
143 else: |
144 code, ok = self.__callForm(editor) |
144 code, ok = self.__callForm(editor) |
145 if ok: |
145 if ok: |
146 line, index = editor.getCursorPosition() |
146 line, index = editor.getCursorPosition() |
147 # It should be done on this way to allow undo |
147 # It should be done on this way to allow undo |