-
Notifications
You must be signed in to change notification settings - Fork 2
Feature/pm 140 edit log entries #72
base: develop
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #72 +/- ##
===========================================
- Coverage 68.36% 65.74% -2.63%
===========================================
Files 9 9
Lines 411 432 +21
Branches 50 56 +6
===========================================
+ Hits 281 284 +3
- Misses 123 140 +17
- Partials 7 8 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is something wrong with the time of edited entries. It resetted to 01:00:00 :s
Also, more design choices, you might want to
- Not allow the editing of automatic entries, as that would allow (accidentally) falsifying data which could give a very wrong impression of what happened later.
- I think you already looked at this, but it would probably be more intuitive if double click would allow you to type inside the entry. One way of achieving this might be by replacing the entry with a editable textbox.
entry_content, ok = QInputDialog().getText(self, 'Edit Entry', 'Entry:', | ||
QLineEdit.Normal, entry.content) | ||
if ok and entry_content: | ||
entry.edit_content(entry_content) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
entry.edit_content(entry_content) | |
entry.content = entry_content |
The pythonic way is to just directly edit the parameter. Parameters that you want to be "private" should be marked by a leading _, If you need "getters/setters" for these variables, you can use @Property to keep the syntax pythonic.
Closes PM-140
Description
Added the option of editing existing entries in the log.
WARNING: When the logger is in autosave mode, the edits do take place. However the entries will get out of order (date and time do not change), since the edit will remove the "old" entry and add a new one at the back of the text file. Maybe a new Issue is in place.
Changes
In "entry.py":
In "entry_model.py":
In "notes_widget.py":
Testing
None