aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2021-09-12 20:04:14 +0200
committerJavier <dev.git@javispedro.com>2021-09-12 20:04:14 +0200
commit4af8cdc636aa69ada1a588618371b842f9d550b1 (patch)
tree6c3a251bf69df56cb7332dc916ff395e6608d993
parentac7b085449fb49f54225d22c7c229da6ad120e2b (diff)
downloadscribiu-4af8cdc636aa69ada1a588618371b842f9d550b1.tar.gz
scribiu-4af8cdc636aa69ada1a588618371b842f9d550b1.zip
fix bug preventing refresh of notebooks after sync
-rw-r--r--notebookmodel.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/notebookmodel.cc b/notebookmodel.cc
index 5709b8b..dc066de 100644
--- a/notebookmodel.cc
+++ b/notebookmodel.cc
@@ -472,8 +472,9 @@ void NotebookModel::handleChangedDirectory(const QString &path)
qDebug() << "changed" << path;
if (path == _dataDir.absolutePath()) {
refresh();
- } else if (path.endsWith(".pen")) {
+ } else if (path.endsWith("." PEN_EXTENSION, Qt::CaseInsensitive)
+ || path.endsWith("." ARCHIVE_EXTENSION, Qt::CaseInsensitive)) {
QFileInfo finfo(path);
- refreshPen(finfo.baseName());
+ refreshPen(finfo.fileName());
}
}