Fix print cursor position

This commit is contained in:
Vadim Kuznetsov 2024-03-25 09:26:17 +03:00
parent 3ebcd2e2d2
commit 3470ec6507
2 changed files with 4 additions and 4 deletions

View File

@ -61,8 +61,8 @@ TextDoc::TextDoc(QucsApp *App_, const QString& Name_) : QPlainTextEdit(), QucsDo
connect(this, SIGNAL(cursorPositionChanged()), connect(this, SIGNAL(cursorPositionChanged()),
SLOT(slotCursorPosChanged())); SLOT(slotCursorPosChanged()));
if (App_) { if (App_) {
connect(this, SIGNAL(signalCursorPosChanged(int, int)), connect(this, SIGNAL(signalCursorPosChanged(int, int, QString)),
App_, SLOT(printCursorPosition(int, int))); App_, SLOT(printCursorPosition(int, int, QString)));
connect(this, SIGNAL(signalUndoState(bool)), connect(this, SIGNAL(signalUndoState(bool)),
App_, SLOT(slotUpdateUndo(bool))); App_, SLOT(slotUpdateUndo(bool)));
connect(this, SIGNAL(signalRedoState(bool)), connect(this, SIGNAL(signalRedoState(bool)),
@ -318,7 +318,7 @@ void TextDoc::slotCursorPosChanged()
QTextCursor pos = textCursor(); QTextCursor pos = textCursor();
int x = pos.blockNumber(); int x = pos.blockNumber();
int y = pos.columnNumber(); int y = pos.columnNumber();
emit signalCursorPosChanged(x+1, y+1); emit signalCursorPosChanged(x+1, y+1, "");
tmpPosX = x; tmpPosX = x;
tmpPosY = y; tmpPosY = y;
} }

View File

@ -84,7 +84,7 @@ public:
QMenu* createStandardContextMenu(); QMenu* createStandardContextMenu();
signals: signals:
void signalCursorPosChanged(int, int); void signalCursorPosChanged(int, int, QString);
void signalFileChanged(bool); void signalFileChanged(bool);
void signalUndoState(bool); void signalUndoState(bool);
void signalRedoState(bool); void signalRedoState(bool);