- enhancement: mark editor as modified, if the editing file is changed by other applications.
- enhancement: When the editing files is changed by other applications, only show one notification dialog for each file.
This commit is contained in:
parent
5182e200fb
commit
67e686652d
2
NEWS.md
2
NEWS.md
|
@ -1,5 +1,7 @@
|
||||||
Red Panda C++ Version 1.1.0
|
Red Panda C++ Version 1.1.0
|
||||||
- enhancement: when ctrl+mouse cursor hovered an identifier or header name, use underline to highlight it
|
- enhancement: when ctrl+mouse cursor hovered an identifier or header name, use underline to highlight it
|
||||||
|
- enhancement: mark editor as modified, if the editing file is changed by other applications.
|
||||||
|
- enhancement: When the editing files is changed by other applications, only show one notification dialog for each file.
|
||||||
|
|
||||||
Red Panda C++ Version 1.0.10
|
Red Panda C++ Version 1.0.10
|
||||||
- fix: modify watch doesn't work
|
- fix: modify watch doesn't work
|
||||||
|
|
|
@ -4151,8 +4151,12 @@ void MainWindow::updateProjectView()
|
||||||
|
|
||||||
void MainWindow::onFileChanged(const QString &path)
|
void MainWindow::onFileChanged(const QString &path)
|
||||||
{
|
{
|
||||||
|
if (mFilesChangedNotifying.contains(path))
|
||||||
|
return;
|
||||||
|
mFilesChangedNotifying.insert(path);
|
||||||
Editor *e = mEditorList->getOpenedEditorByFilename(path);
|
Editor *e = mEditorList->getOpenedEditorByFilename(path);
|
||||||
if (e) {
|
if (e) {
|
||||||
|
e->setModified(true);
|
||||||
if (fileExists(path)) {
|
if (fileExists(path)) {
|
||||||
e->activate();
|
e->activate();
|
||||||
if (QMessageBox::question(this,tr("File Changed"),
|
if (QMessageBox::question(this,tr("File Changed"),
|
||||||
|
@ -4178,6 +4182,7 @@ void MainWindow::onFileChanged(const QString &path)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
mFilesChangedNotifying.remove(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::onFilesViewPathChanged()
|
void MainWindow::onFilesViewPathChanged()
|
||||||
|
|
|
@ -740,6 +740,8 @@ private:
|
||||||
QTcpServer mTcpServer;
|
QTcpServer mTcpServer;
|
||||||
QColor mErrorColor;
|
QColor mErrorColor;
|
||||||
|
|
||||||
|
QSet<QString> mFilesChangedNotifying;
|
||||||
|
|
||||||
//actions for compile issue table
|
//actions for compile issue table
|
||||||
QAction * mTableIssuesCopyAction;
|
QAction * mTableIssuesCopyAction;
|
||||||
QAction * mTableIssuesCopyAllAction;
|
QAction * mTableIssuesCopyAllAction;
|
||||||
|
|
Loading…
Reference in New Issue