diff --git a/saoriviewentry.cpp b/saoriviewentry.cpp
index c00d679..a4bee87 100644
--- a/saoriviewentry.cpp
+++ b/saoriviewentry.cpp
@@ -36,6 +36,7 @@
SaoriViewEntry::SaoriViewEntry(QWidget *parent)
{
SaoriViewEntry(0,parent);
+ m_cw = false;
}
SaoriViewEntry::SaoriViewEntry(qlonglong id, QWidget *parent) :
@@ -52,13 +53,17 @@
m_id = id;
connect(SaoriApplication::saori()->cache(),&SaoriCache::downloaded,this,&SaoriViewEntry::downloaded);
connect(this,&SaoriViewEntry::anchorClicked,this,[&](const QUrl url){
- if (url.toString().left(3) == "cw:") setContent(m_original,false);
+ if (url.toString().left(3) == "cw:") {
+ m_cw = m_cw ? false : true;
+ setContent(m_original,m_cw);
+ }
});
}
void SaoriViewEntry::setContent(const QString content, bool cw)
{
m_original = content;
+ m_cw = cw;
document()->clear();
QStringList imgs;
for (int i = 0;(i = m_original.indexOf("cache()->fileCache(url);
- setContent(m_original);
+ setContent(m_original,m_cw);
for (auto i = m_urlmap.begin();i != m_urlmap.end();i ++) {
if (i.value().left(2) == ":/") {
if (i.key().left(2) != ":/") {
diff --git a/saoriviewentry.h b/saoriviewentry.h
index 96e3860..56858ec 100644
--- a/saoriviewentry.h
+++ b/saoriviewentry.h
@@ -51,6 +51,7 @@
protected:
qlonglong m_id;
QString m_original;
+ bool m_cw;
QMap m_urlmap;
protected slots: