diff options
author | Ken Moore <ken@ixsystems.com> | 2018-05-21 15:23:07 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2018-05-21 15:23:07 -0400 |
commit | ebe83b1f96ca2df76d0d7e41e853911625c9c25f (patch) | |
tree | 688bd68a8ac27b0d83aec9c464fc13917f38f165 /src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.cpp | |
parent | Couple quick updates to lumina-textedit: (diff) | |
download | lumina-ebe83b1f96ca2df76d0d7e41e853911625c9c25f.tar.gz lumina-ebe83b1f96ca2df76d0d7e41e853911625c9c25f.tar.bz2 lumina-ebe83b1f96ca2df76d0d7e41e853911625c9c25f.zip |
A couple more cleanup operations for lumina textedit
Main change being that when opening the file select dialog it will automatically re-highlight the current file.
Diffstat (limited to 'src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.cpp')
-rw-r--r-- | src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.cpp b/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.cpp index f96efef1..69dc2eab 100644 --- a/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.cpp +++ b/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.cpp @@ -53,21 +53,22 @@ void PlainTextEditor::showLineNumbers(bool show){ } void PlainTextEditor::LoadSyntaxRule(QString type){ - qDebug() << "Load SyntaxRule"; + //qDebug() << "Load SyntaxRule"; QList<SyntaxFile> files = SyntaxFile::availableFiles(settings); for(int i=0; i<files.length(); i++){ if(files[i].name() == type){ files[i].SetupDocument(this); SYNTAX->loadRules(files[i]); break; + }else if(i==files.length()-1){ + SyntaxFile dummy; SYNTAX->loadRules(dummy); } - if(i==files.length()-1){ SyntaxFile dummy; SYNTAX->loadRules(dummy); } } SYNTAX->rehighlight(); } void PlainTextEditor::updateSyntaxColors(){ - qDebug() << "Update Syntax Colors"; + //qDebug() << "Update Syntax Colors"; SYNTAX->reloadRules(); SYNTAX->rehighlight(); } |