Commit graph

120 commits

Author SHA1 Message Date
tntscreed 863e8df483 Bug and style fixes.
- Made small changes to better fit the style of the project.

- Fixed a bug that would result in a crash when details were applied with the bulk info manager.

- Improved the Bulk Manager UI by adding the list-add and list-remove icons, to better fit it to Manuskript's style. Also added tooltips.
2023-03-16 16:06:48 +01:00
tntscreed a046656acf Made bulk-adding "Detailed info" to characters possible
-Changed the selection mode to extended selection on the lstCharacters tree-view. This will not affect anything else other than the "detailed info" rows. Every other change to a character's descriptions, motivations and such only affect the last selected one.

-Made a method to get all the IDs of the selected characters.

-Added a character-info dialog UI. Originally, adding information worked by adding a placeholder and then changing it. Users never want to just add a placeholder without initialising the values. And the bulk-adding only works this way.
2023-03-05 00:58:25 +01:00
TheJackiMonster 16f6ecc8bc
Fix crash of issue #1082
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2023-02-10 22:42:00 +01:00
TheJackiMonster 3ac87d9125
Fix potential issue from the future
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2023-02-10 00:11:27 +01:00
TheJackiMonster 72933c9978
Adjust syntax and formatting
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2023-02-09 22:58:45 +01:00
TheJackiMonster 19cbe7fdf6
Allow huge xml files to be parsed
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2023-02-09 22:24:17 +01:00
TheJackiMonster 00aca6a0e1
Fix type conversions, replace potentially deprecated function usage and center dialog
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2022-12-10 18:05:41 +01:00
TheJackiMonster 48af930b11
Added checking for rootItem in models
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2022-08-10 12:17:14 +02:00
TheJackiMonster 0e342337dd
Updated translation files and added more labels to translation
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2022-08-09 13:44:53 +02:00
Tobias Frisch e780963891
Merge pull request #1002 from olivierkes/duplicate_ids
Potential fix for #719, #1001: data loss when reordering items in upward direction
2022-05-28 12:03:58 +02:00
TheJackiMonster a33249fc9d
Added guard to catch errors with translation
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2022-05-17 11:43:22 +02:00
Olivier Keshavjee 0330336311 Does not simply warn of duplicate IDs, but fixes them. 2022-01-22 09:53:36 +01:00
Olivier Keshavjee 47b55ba164 Potential fix for #719, #1001 2022-01-21 16:49:04 +01:00
TheJackiMonster d56c2225a3
Fixed issue #865 by adjusting the available IDs in an items constructor
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2021-12-11 01:34:39 +01:00
TheJackiMonster 77eee852de
Fixed issue #808 by resetting POV once the character gets deleted
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2021-11-30 23:40:31 +01:00
Jan Wester 32caf6aa04 Partial fix for erroneous nbsp->space conversion
QDocument::toPlainText() has the stupid decision to convert nbsp to
spaces in it, which our users obviously hate. Unfortunately, this is
out of our control to fix completely. It is a very deep rabbit hole. :(

Typing non-breaking spaces in the editor now works. Reopening these
files at a later point has these characters remain intact.

What does NOT work is copy-pasting non-breaking spaces. These will end
up looking like normal spaces when you paste them somewhere else, be it
in Manuskript or some other document. In other words: it is impossible
for users to verify whether something is a non-breaking space or an
ordinary one.

I realize that it makes this partial fix meaningless for many. Sorry. :/

Partially fixes issue 738.
2021-07-10 19:01:58 +02:00
Jan Wester 87f1fc0187 Bugfix for filtering on POV characters
If a project only had one character, and it was marked as a POV
character, then that could lead to the accessing of a non-existent
second character. (Yes. That code was very broken.)

Fixes issues 843, 875, 896.
2021-07-10 19:01:58 +02:00
Tobias Frisch 4bfd663886
Merge pull request #894 from zeth/race-condition
Deal with race condition.
2021-06-21 18:38:35 +02:00
Tobias Frisch 9a5117be38
Fixed identation to match other code 2021-06-21 14:34:41 +02:00
Zeth Green 8acb9b3839 Deal with race condition. 2021-06-21 02:56:16 +01:00
Zeth Green bc10cd3671 Someone was in a JavaScript mood? 2021-06-21 02:43:09 +01:00
Belug 96a3d282cc Fix missing root when using world building template 2021-04-20 18:57:36 -04:00
TheJackiMonster 173531ef2c
Combined #777 with changes from #827
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2021-04-10 14:46:03 +02:00
Tobias Frisch 653357d2e9
Merge pull request #777 from siliconserf/Issue-324-NoID-Fix
Update abstractModel.py
2021-04-10 14:39:50 +02:00
Belug d22eb3bcb9 Fixing the tests for travis-CI 2021-04-09 19:19:03 -04:00
Alexandre f5fa60c50c
Fix #855 - Avoid a crash when there's no model (#856)
* Fix #855 - Avoid a crash when there's no model

* Moved the update id to the AbstactItem class
2021-04-09 16:03:59 +02:00
Tobias Frisch 0a615bdef2
Merge pull request #667 from worstje/arguments-and-logging
Logging and command-line arguments
2021-04-08 19:37:09 +02:00
Jan Wester ff2cbca028 Converted most print statements to use logging
Some snippets have yet to be converted due to the more complex nature
of those snippets, and to keep things neat a separate commit makes more
sense for those.
2021-04-08 18:44:28 +02:00
Tobias Frisch 7c93567279
Merge branch 'develop' into develop 2021-04-08 18:33:27 +02:00
emgineering bee24d45b0 Change ID assignment method for Outline 2021-04-08 09:57:36 -06:00
Moisés J 1e52af54e2 Add global search 2021-04-02 14:15:17 +01:00
nagolinc 22fdab3f46 added 3 buttons to the textEditView that allow quickly adding new items
add character takes parameter name
2021-02-21 20:06:17 -05:00
TheJackiMonster 12be4c3a3d
Fixed all Python syntax warnings 2021-02-21 23:45:34 +01:00
bentleyjoakes 06e35cd969 Clones importance setting.
When creating a new character, sets an appropriate importance level.
* If a character is selected, the new character has the same importance level.
* If a top-level importance level is selected, the new character has that level
* Otherwise, the importance level is zero
2021-02-21 21:09:20 +01:00
Tobias Frisch 13d1f1bddd
Merge pull request #735 from johnbintz/select-newly-added-world-item
Select newly added world items, opening branches as necessary
2021-02-21 18:14:41 +01:00
Tobias Frisch e8c61e74ba
Merge branch 'develop' into optional-pov 2021-02-19 16:02:45 +01:00
TheJackiMonster 61734c1afa
Enabling/Disabling POV for a specific character 2021-02-19 16:01:30 +01:00
Tobias Frisch 1b62288982
Merge branch 'develop' into charcount 2021-02-19 15:08:51 +01:00
Tobias Frisch 30b15b94dc
Merge branch 'develop' into characterscount 2021-02-19 15:05:15 +01:00
TheJackiMonster fc653ad74b Added setting to disable counting spaces as chars but requires restart 2020-07-05 01:27:54 +02:00
siliconserf ed78f6e56f Update abstractModel.py 2020-06-04 14:25:27 -07:00
TheJackiMonster 24f3f092bb Added char-count with settings to enable/disable it. 2020-03-27 15:12:44 +01:00
John Bintz 5ca087a67d Select newly added world items, opening branches as necessary 2020-02-09 10:54:40 -05:00
luz.paz 2fd45dc42c Fix misc. typos
Found via `codespell -q 3 -S *.ts,./libs,./sample-projects -L searchin`
2019-09-19 09:58:24 -06:00
Youness Alaoui a8ec6512c9 Fix crash if invalid character is inserted into the text.
If an invalid character is inserted into the text, such as a "^L" (ASCII 0x0C)
when copy-pasting from a google document that has a page break in it, a crash
will happen as the character cannot be inserted into XML. This patch removes
those invalid characters from the text so the revisions.xml can be saved.

Fixes #562
2019-05-21 09:52:18 -06:00
Jan Wester 12390a9aab Fix occasional crashes when (re)moving items
Describing all the rabbitholes that I and kakaroto have gone through
while debugging this one until dawn can frankly not do enough justice to
the crazy amount of rubberducking that went on while trying to fix this.

This bug would be triggered whenever you had a document open in the
editor and then moved an ancestor object downwards (visually) in the tree.
Or when you simply deleted the ancestor. Depending on the exact method
that caused the opened item to be removed from the internal model, the
exact nature of the bug would vary, which means this commit fixes a few
different bits of code that lead to what appears to be the same bug.

In order of appearance, the bugs that ruined our sleep were:

1) The editor widget was trying to handle the removed item at too late a
stage.

2) The editor widget tried to fix its view after a move by searching for
the new item with the same ID, but in the case of moving an object down
it came across its own old item, ruining the attempt.

3) The editor widget did not properly account for the hierarchical
nature of the model.

Upon fixing these the next day, it was revealed that:

4) The outlineItem.updateWordCount(emit=False) flag is broken. This
function would call setData() in several spots which would still cause
emits to bubble through the system despite emit=False, and we simply got
lucky that it stopped enough of them until now.

This last one was caused by a small mistake in the fixes for the first
three bugs, but it has led to a couple of extra changes to make any
future bug hunts slightly less arduous and frustrating:

a) When calling item.removeChild(c), it now resets the associated parent
and model to mirror item.insertChild(c). This has also led to an extra
check in model.parent() to check for its validity.

b) The outlineItem.updateWordCount(emit=) flag has been removed entirely
and it now emits away with reckless abandon. I have been unable to
reproduce the crashes the code warned about, so I consider this a code
quality fix to prevent mysterious future issues where things sometimes
do not properly update right.

Worthy of note is that the original code clearly showed the intention to
close tabs for items that were removed. Reworking the editor to support
closing a tab is unfortunately way out of scope, so this intention was
left in and the new fix was structured to make it trivial to implement
such a change when the time comes. An existing FIXME regarding unrelated
buggy editor behaviour was left in, too.

Many thanks to Kakaroto for burning the midnight oil with me to get to
the bottom of this. (I learned a lot that night!)

Issues #479, #516 and #559 are fixed by this commit. And maybe some others,
too.
2019-05-19 09:33:19 -06:00
Youness Alaoui a27a1f399a Adding navigation support to fullscreen editor
This makes the fullscreen editor much more powerful in terms of navigating
through chapters and scenes. This should make issue #234 users happy and
fix #444.

Top panel now has left/right arrows to navigate through the scenes. It will
automatically find the next/previous text item and display it, navigating through
the outline tree.

There's also a "New document" icon which will create a new text entry immediately
after the current one and switch to it.

Navigation can also be done using Alt+Page-Up, Alt+Page-Down or Alt+Left and Alt+right
shortcuts (Fixing #444).

There's now also the option between Title or Path for the top panel, if Path is chosen
then the full path of the scene is displayed and clicking on the scene or parent items
opens a menu to quickly switch to the selected chapter/scene. Selecting a folder will
automatically display the first text entry available in that folder.
2019-04-02 11:42:25 -06:00
Curtis Gedak 60b58d9658 Fix Python 3.7 DeprecationWarning use local.format_string() messages
Fix by replacing locale.format() with locale.format_string().
2018-11-16 12:52:56 -07:00
Curtis Gedak 026861ee87 Fix plot importance changes if delete earlier plot and click other plots
The root cause was a mismatch between plot IDs and plot model rows.

This issue would appear when a plot was deleted such that the plot IDs
did not match the plot model row numbers and different plots had
different importance levels.  The problem would not occur if the most
recently added plot was deleted.

The plot ID / plot model row mismatch was introduced with the
following commit:

    Fixes: add plot then choose new plot does not set \
    importance slider
    3569f78928

Closes issue #404
2018-11-05 09:29:53 -07:00
Lech Baczynski c6da77baf9 - adding characters count. Implementing #334 2018-04-09 11:13:01 +02:00