Skip to content

Commit

Permalink
Fixed bug with relative paths in filename (at statusbar)
Browse files Browse the repository at this point in the history
  • Loading branch information
mezomish committed Apr 19, 2008
1 parent ba6e4b4 commit 4802826
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
17 changes: 10 additions & 7 deletions ChangeLog
@@ -1,20 +1,23 @@
2008-04-17:
* Added "replaceTabsWithSpaces" option (manually at
2008-04-17:
* Added: "replaceTabsWithSpaces" option (manually at
config file for now)

* Added: restoring scrollbar and cursor position when
restoring session
* Fixed: bug with relative paths in filename (at statusbar)

2008-04-16:
* Fixed: if the app was closed maximized, it doesn't restore
normal size when started again;
* Added French localization;
* Added: French localization;

2008-04-15:
* Fixed: crash when tried to change 'Show line numbers' or
'Adjust by width' without any opened documents;
* added options 'Show indents' and 'Highlight current line'
* Added: options 'Show indents' and 'Highlight current line'
to Settings dialog;
* Added "useCurrentDocDir" option (manually at
* Added: "useCurrentDocDir" option (manually at
config file for now) for 'Open file' dialog;


-------------------------------
Version 0.3-dev
Expand Down
5 changes: 3 additions & 2 deletions src/DocHandler.cpp
Expand Up @@ -206,9 +206,10 @@ Document* DocHandler::newDocument(const QString& fileName) {
}

if (doc->isNull()) {

QString fName = QFileInfo(fileName).canonicalFilePath();

DocView* docView = createDocView();
doc = createDocument(fileName, docView);
doc = createDocument(fName, docView);

connect(docView, SIGNAL(modified(bool)), SLOT(docModified(bool)));
connect(doc, SIGNAL(fileNameChanged()), SLOT(docFileNameChanged()));
Expand Down
2 changes: 1 addition & 1 deletion src/Document.cpp
Expand Up @@ -63,7 +63,7 @@ void Document::extModMonitoringStop() {

void Document::setFileName(const QString& fileName) {
if (fileName_.compare(fileName) != 0) {
fileName_ = fileName;
fileName_ = QFileInfo(fileName).canonicalFilePath();
emit fileNameChanged();
}
}
Expand Down

0 comments on commit 4802826

Please sign in to comment.