Commit Graph

24 Commits

Author SHA1 Message Date
arch1t3cht 7bc18fec26 Merge branch 'folding' into feature 2023-06-01 23:35:39 +02:00
arch1t3cht b41f6bde71 Don't immediately delete unused extradata entries
Instead, count how many consecutive times the entry has been found to be
unused and delete it once that count exceeds a limit. This will prevent
excessive reallocating of extradata ID's in applications like folding.
2023-06-01 23:35:26 +02:00
arch1t3cht 79a0655eb8 Merge branch 'folding' into feature 2023-01-27 02:55:50 +01:00
arch1t3cht 1bd426f69a folding: Switch to extradata for storage
This makes the internal juggling of fold data even more complicated, but
it has a number of advantages:
- Folds will preserved even when opening the file with Aegisub builds
  that don't know about folding.
- Folds will be preserved by automation scripts that re-insert every
- Folds do not break when adding or deleting lines in a text editor or
  some other editor, as long as the lines involving folds aren't
- In particular, merging changes using tools like git will not break
- Copy/pasting folds also keeps the folds to some extent. This is
  impossible to solve in full generality, but simple cases like
  cut/pasting a folded section somewhere else work, as long as the file
  isn't saved in between.
- This will give automation scripts full access to folding without
  needing to set up any additional API functions.
2023-01-02 02:40:19 +01:00
arch1t3cht bb16cdf7fe Merge branches 'folding', 'misc' and 'bestsource' into feature 2022-08-23 20:16:55 +02:00
arch1t3cht c8d4df1355 Add option to sort subtitles by text 2022-08-23 16:11:23 +02:00
arch1t3cht 56cc1a6873 Add line folding
Line folds are managed using metadata of AssDialogue elements, and
saved in the project properties. They only affect the appearance of the
subtitle grid, and have no impact on other line operations.
2022-07-27 15:23:47 +02:00
Thomas Goyne 372b9fe115 Eliminate a pointless set that only ever had zero or one entries 2014-12-28 16:46:37 -08:00
Thomas Goyne 9e6d5d7d9c Optimize Extradata handling a bit 2014-09-06 09:47:29 -07:00
torque 3c12fc69f3 Perform extradata deduplication on add.
Checks all existing extradata keys and values to ensure that the set
that is being added doesn't already exist.
2014-08-24 12:06:22 -07:00
Thomas Goyne 831fbcd9a0 Fix crash when an extradata entry is used by more than one line 2014-06-09 17:20:56 -07:00
Thomas Goyne 20a7ec786f Use initializer lists rather than std::make_pair 2014-05-26 09:34:18 -07:00
Thomas Goyne 09e325a1c3 Clean up unused includes 2014-05-23 07:28:24 -07:00
Thomas Goyne 9c7119fdc2 Redesign how project metadata is stored in the file
Remove it from the script info section and put it in its own section
that isn't tracked by undo and make it not stringly typed. Removes the
need for the gross hack where changes are slipped in just before saving
to circumvent the undo system, cuts down on the uses of string literals
to identify fields, and probably improves performance a little.
2014-05-22 09:29:15 -07:00
Niels Martin Hansen 82d7979f04 Pass style catalog names instead of file names to AssFile::LoadDefault 2014-05-04 13:04:48 +02:00
Niels Martin Hansen f45f73151e Copy styles from Default catalog to new files 2014-05-03 20:02:52 +02:00
Thomas Goyne 1eba2f035c Add a separate SSA subtitle format and move all of the SSA writing stuff there 2014-04-30 06:29:37 -07:00
Thomas Goyne d0603fde88 Don't check for used extradata ids if there are none 2014-04-25 08:59:43 -07:00
Niels Martin Hansen 8076fb2791 Basic storage and loading/saving for extradata 2014-04-23 22:54:01 +02:00
Thomas Goyne 1d5292fdee Kill config.h and just force-include acconf.h in non-pch builds 2014-04-16 08:11:37 -07:00
Thomas Goyne df762b5b99 Add a checked iterator_to() to AssFile
iterator_to requires that the object be in the list, which is sometimes
not the case when processing a commit which removed the active line or a
selected line. To handle this, add a checked version that returns
Events.end() when it is not in the list rather than crashing.
2014-04-04 09:01:02 -07:00
Thomas Goyne b8d67b3d8e Update row numbers after an order-changing commit 2014-04-01 09:19:30 -07:00
Thomas Goyne 3bbbc56053 Add the line's row number to AssDialogue
The grid needs to be able to map AssDialogue * to a row number, and just
storing it in the AssDialogue is nearly strictly better than a std::map
mapping events to rows. Probably will be of use elsewhere as well.
2014-03-31 08:11:43 -07:00
Thomas Goyne 33a4a056a4 Move everything up a level since the root dir no longer has stuff 2014-03-11 12:14:57 -07:00
Renamed from aegisub/src/ass_file.cpp (Browse further)