mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-05 00:21:29 +00:00
2bb2643ae4
Currently, the notes field uses a QTextEdit, which doesn't send a signal if it goes out of focus. But for undo of dive-editing we don't want to create an undo object for *every* text change. Thus, create a custom TextEdit widget that derives from QTextEdit and turns the focusOutEvent into a editingFinished signal. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
7 lines
129 B
C++
7 lines
129 B
C++
#include "textedit.h"
|
|
|
|
void TextEdit::focusOutEvent(QFocusEvent *ev)
|
|
{
|
|
QTextEdit::focusOutEvent(ev);
|
|
emit editingFinished();
|
|
}
|