Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
editbox: replace lines edited with recreated line text
program model now emits a signal when a program line is changed (though its contents may not have actually changed) or inserted; this signal is connected to the program changed slot in edit box, which retrieves the recreated text for the line and replaces the line with this text (unless the line text is null indicating the line has an error and therefore the text of the line is not replaced) the program model line text function was modified to return a null string if the line has an error; this required a slight change to the recreator where the output string is initialized to an empty string instead of being cleared (which sets the string to a null string) added a 'recreating line' flag to prevent a circular loop when the text of the line is replaced, which generates a document changed and cursor moved signals; this flag prevents these signals from being processed during the text replacement there are two issues with these changes the need to be resolved: when a program is initially loaded, the lines are not recreated because the text cursor is not valid yet (preventing the replacement of text) and the replacing of text interferes with the undo/redo stack by adding extra commands in the undo stack for each line replaced
- Loading branch information
1 parent
c864bdd
commit 4b34bd2
Showing
5 changed files
with
73 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters