work save

This commit is contained in:
royqh1979 2021-09-17 08:01:02 +08:00
parent b88dd1478c
commit f2156919e0
2 changed files with 3 additions and 2 deletions

View File

@ -1692,7 +1692,7 @@ QVariant WatchModel::data(const QModelIndex &index, int role) const
WatchVar* item = static_cast<WatchVar*>(index.internalPointer());
switch (role) {
case Qt::DisplayRole:
qDebug()<<"item->text:"<<item->text;
//qDebug()<<"item->text:"<<item->text;
return item->text;
}
return QVariant();
@ -1852,7 +1852,7 @@ void WatchModel::notifyUpdated(PWatchVar var)
}
if (row<0)
return;
qDebug()<<"dataChanged"<<row<<":"<<var->text;
//qDebug()<<"dataChanged"<<row<<":"<<var->text;
emit dataChanged(createIndex(row,0,var.get()),createIndex(row,0,var.get()));
}

View File

@ -622,6 +622,7 @@ bool Project::assignTemplate(const std::shared_ptr<ProjectTemplate> aTemplate)
s.replace("#13#10","\r\n");
editor->insertString(s,false);
}
unit->setEditor(editor);
editor->save(true,false);
editor->activate();
}