From 1def1e99445b6259d7a2bee3fd143c28d27bf5da Mon Sep 17 00:00:00 2001 From: AngryFender Date: Tue, 5 Sep 2023 23:55:52 +0100 Subject: [PATCH] Github Issue #12: Setting up defaults cursor positions for loading documents --- views_handler.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/views_handler.cpp b/views_handler.cpp index 7ec98fd..d273a88 100644 --- a/views_handler.cpp +++ b/views_handler.cpp @@ -241,7 +241,6 @@ QString ViewsHandler::getFileContent(QFile& file) { QTextStream stream(&file); content = stream.readAll(); - } file.close(); return content; @@ -253,7 +252,6 @@ void ViewsHandler::setCurrentDocument(const QFileInfo &fileInfo) disconnectDocument(); //set current document to textview - const QString &filePath = fileInfo.absoluteFilePath(); const QString &fileName = fileInfo.baseName(); currentDocument = recentFileDocumentMap.value(filePath); @@ -297,7 +295,7 @@ void ViewsHandler::fileDisplay(const QModelIndex& index) viewText->update(); // viewText->initialialCursorPosition(); - viewText->verticalScrollBar()->setSliderPosition(0); + // viewText->verticalScrollBar()->setSliderPosition(0); } void ViewsHandler::fileSaveHandle()