Commit a4f32e2d authored by Christoph Cullmann's avatar Christoph Cullmann 🐮
Browse files

always reset to ibeam cursor

with bad timing, we did before reset back to invisible
cursor if this was triggered during the time frame
when cursor is hidden for pressing a key
parent c095d67e
......@@ -269,11 +269,11 @@ public:
// set the cursor
auto &data = docs[doc];
if (w) {
// track original cursor
if (!data.wid) {
data.wid = w;
data.cursor = w->cursor();
// if we had a widget => reset to original cursor for it and track new one
if (data.wid) {
data.wid->setCursor(Qt::IBeamCursor);
}
data.wid = w;
w->setCursor(Qt::PointingHandCursor);
}
......@@ -321,7 +321,7 @@ public:
mr->setRange(KTextEditor::Range::invalid());
}
if (data.wid) {
data.wid->setCursor(data.cursor);
data.wid->setCursor(Qt::IBeamCursor);
data.wid = nullptr;
}
}
......@@ -348,7 +348,7 @@ private:
if (it != docs.end()) {
auto &data = it->second;
if (data.wid) {
data.wid->setCursor(data.cursor);
data.wid->setCursor(Qt::IBeamCursor);
}
docs.erase(it);
}
......@@ -360,7 +360,6 @@ private:
std::unique_ptr<KTextEditor::MovingRange> range = nullptr;
// widget to restore cursor on
QPointer<QWidget> wid;
QCursor cursor;
};
QPointer<QWidget> w;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment