Skip to content

Commit c832093

Browse files
committed
Fix issue with loading and editing empty documents for editors
1 parent 172503f commit c832093

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/corelib/business_layer/model/abstract_model.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,15 @@ bool AbstractModel::isRedoInProcess() const
281281
bool AbstractModel::mergeDocumentChanges(const QByteArray _content,
282282
const QVector<QByteArray>& _patches)
283283
{
284+
//
285+
// Если в документе на данный момент нет содержимого, то сформируем болванку, для
286+
// дальнейшего сохранения изменений она должна быть
287+
//
288+
if (document()->content().isEmpty()) {
289+
reassignContent();
290+
}
291+
292+
284293
if (_content.isEmpty() && _patches.isEmpty()) {
285294
return false;
286295
}

0 commit comments

Comments
 (0)