- enhancement: better behavior of mouse tips
This commit is contained in:
parent
bf17e494fd
commit
04770a6fd8
1
NEWS.md
1
NEWS.md
|
@ -22,6 +22,7 @@ Red Panda C++ Version 0.13.2
|
|||
- fix: If project's compiler set is not the same with the default compiler set, auto openned project's file will use wrong compiler set to do syntax check.
|
||||
- fix: open a project file through "File"->"Open" will not correctly connect it with the project internally
|
||||
- fix: wrong project program directory parameter is sent to the debugger
|
||||
- enhancement: better behavior of mouse tips
|
||||
|
||||
Red Panda C++ Version 0.13.1
|
||||
- enhancement: suppoort localization info in project templates
|
||||
|
|
|
@ -1080,6 +1080,9 @@ bool Editor::event(QEvent *event)
|
|||
} else if (cursor() == Qt::PointingHandCursor) {
|
||||
updateMouseCursor();
|
||||
}
|
||||
if (pMainWindow->functionTip()->isVisible()) {
|
||||
pMainWindow->functionTip()->hide();
|
||||
}
|
||||
QToolTip::showText(mapToGlobal(helpEvent->pos()),hint);
|
||||
event->ignore();
|
||||
} else {
|
||||
|
@ -2577,6 +2580,9 @@ void Editor::exportAsHTML(const QString &htmlFilename)
|
|||
|
||||
void Editor::showCompletion(const QString& preWord,bool autoComplete)
|
||||
{
|
||||
if (pMainWindow->functionTip()->isVisible()) {
|
||||
pMainWindow->functionTip()->hide();
|
||||
}
|
||||
if (!pSettings->codeCompletion().enabled())
|
||||
return;
|
||||
if (!mParser->enabled())
|
||||
|
@ -3060,8 +3066,8 @@ void Editor::cancelHint()
|
|||
|
||||
// disable editor hint
|
||||
QToolTip::hideText();
|
||||
mCurrentWord = "";
|
||||
mCurrentTipType = TipType::None;
|
||||
//mCurrentWord = "";
|
||||
//mCurrentTipType = TipType::None;
|
||||
updateMouseCursor();
|
||||
}
|
||||
|
||||
|
@ -3129,6 +3135,9 @@ void Editor::showDebugHint(const QString &s, int line)
|
|||
}
|
||||
if (pMainWindow->debugger()->commandRunning())
|
||||
return;
|
||||
if (pMainWindow->functionTip()->isVisible()) {
|
||||
pMainWindow->functionTip()->hide();
|
||||
}
|
||||
connect(pMainWindow->debugger(), &Debugger::evalValueReady,
|
||||
this, &Editor::onTipEvalValueReady);
|
||||
mCurrentDebugTipWord = s;
|
||||
|
@ -3358,6 +3367,7 @@ void Editor::updateFunctionTip()
|
|||
pMainWindow->functionTip()->setParamIndex(
|
||||
paramPos
|
||||
);
|
||||
cancelHint();
|
||||
pMainWindow->functionTip()->show();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue