Fix problems with unnesesary unsaved empty entries when load worksheet from file

Authored by sirgienko on Apr 5 2018, 5:48 PM.

Description

Fix problems with unnesesary unsaved empty entries when load worksheet from file

Summary: Before, if you save worksheet and load it, you have see, that after each line have added empty entry. It happens, because command entry after placing result checks existence next entry. If entry don't exist, the command entry add new empty command entry, so worksheet always have empty entry on the end of the worksheet. But when we load entries from file, we haven't empty entry on the end, because we place entries one by one. So each time, when we place command from file, the command after placing result (from file too) add empty entry. It fix this problem by adding check before adding empty entry, that we don't load entries from file.

Test Plan:

  1. Write multiline worksheet
  2. Save it
  3. Close it
  4. Open it
  5. Checks, that there aren't unnesesary empty entries.

Reviewers: Cantor, asemke

Reviewed By: Cantor, asemke

Subscribers: Cantor, KDE Edu

Tags: KDE Edu, Cantor

Differential Revision: https://phabricator.kde.org/D11962