FontTrueType: Improved glyph codepoint fallback.

ProjectSearch fixes.
ecode: AppConfig: don't load a new document if the document is being loaded.
This commit is contained in:
Martín Lucas Golini
2022-10-06 15:47:26 -03:00
parent 5ea52a2984
commit 325db8f981
12 changed files with 119 additions and 49 deletions

View File

@@ -2089,7 +2089,7 @@ void App::onColorSchemeChanged( const std::string& ) {
mSplitter->getCurrentColorScheme().getName().c_str() ) );
}
void App::onDocumentLoaded( UICodeEditor* editor, const std::string& path ) {
void App::onRealDocumentLoaded( UICodeEditor* editor, const std::string& path ) {
updateEditorTitle( editor );
if ( mSplitter->curEditorExistsAndFocused() && editor == mSplitter->getCurEditor() )
updateCurrentFileType();
@@ -2121,6 +2121,18 @@ void App::onDocumentLoaded( UICodeEditor* editor, const std::string& path ) {
}
}
void App::onDocumentLoaded( UICodeEditor* editor, const std::string& path ) {
onRealDocumentLoaded( editor, path );
// Check if other editor is using the same document and needs to receive the same notification
const TextDocument* docPtr = &editor->getDocument();
mSplitter->forEachEditor( [&, docPtr, editor]( UICodeEditor* otherEditor ) {
if ( otherEditor != editor && docPtr == &otherEditor->getDocument() ) {
onRealDocumentLoaded( otherEditor, path );
}
} );
}
const CodeEditorConfig& App::getCodeEditorConfig() const {
return mConfig.editor;
}