diff --git a/src/models/plotModel.py b/src/models/plotModel.py index 4e2c0ecb..cd8f880e 100644 --- a/src/models/plotModel.py +++ b/src/models/plotModel.py @@ -161,7 +161,7 @@ class plotModel(QStandardItemModel): parentItem.takeRow(index.row()) def updatePlotPersoButton(self): - menu = QMenu() + menu = QMenu(self.mw) menus = [] for i in [self.tr("Main"), self.tr("Secondary"), self.tr("Minor")]: diff --git a/src/ui/editors/fullScreenEditor.py b/src/ui/editors/fullScreenEditor.py index f539c7dd..343bfd67 100644 --- a/src/ui/editors/fullScreenEditor.py +++ b/src/ui/editors/fullScreenEditor.py @@ -42,7 +42,7 @@ class fullScreenEditor(QWidget): #self.topPanel.layout().addStretch(1) # Spell checking - self.btnSpellCheck = QPushButton() + self.btnSpellCheck = QPushButton(self) self.btnSpellCheck.setFlat(True) self.btnSpellCheck.setIcon(QIcon.fromTheme("tools-check-spelling")) self.btnSpellCheck.setCheckable(True) diff --git a/src/ui/views/outlineBasics.py b/src/ui/views/outlineBasics.py index 19b27ea5..84b5034d 100644 --- a/src/ui/views/outlineBasics.py +++ b/src/ui/views/outlineBasics.py @@ -26,7 +26,7 @@ class outlineBasics(QAbstractItemView): sel = self.getSelection() clipboard = qApp.clipboard() - self.menu = QMenu() + self.menu = QMenu(self) # Add / remove items self.actAddFolder = QAction(QIcon.fromTheme("folder-new"), qApp.translate("outlineBasics", "New Folder"), self.menu) @@ -150,7 +150,6 @@ class outlineBasics(QAbstractItemView): if _type == "text": _type = self.model()._defaultTextType - print(_type) item = outlineItem(title=qApp.translate("outlineBasics", "New"), _type=_type) self.model().appendItem(item, parent) diff --git a/src/ui/views/textEditView.py b/src/ui/views/textEditView.py index ce317f2a..80d3edf8 100644 --- a/src/ui/views/textEditView.py +++ b/src/ui/views/textEditView.py @@ -367,6 +367,11 @@ class textEditView(QTextEdit): # FORMATTING ############################################################################### + def focusOutEvent(self, event): + "Submit changes just before focusing out." + QTextEdit.focusOutEvent(self, event) + self.submit() + def focusInEvent(self, event): "Finds textFormatter and attach them to that view." QTextEdit.focusInEvent(self, event) @@ -381,4 +386,5 @@ class textEditView(QTextEdit): tF.setTextEdit(self) def applyFormat(self, _format): + #FIXME print(_format) \ No newline at end of file