- // Push directory path.
- string const path = temppath();
- // Prevent the compiler from optimizing away p
- FileName pp(path);
- PathChanger p(pp);
-
- // there are three cases here:
- // 1. we print to a file
- // 2. we print directly to a printer
- // 3. we print using a spool command (print to file first)
- Systemcall one;
- int res = 0;
- string const dviname = changeExtension(latexName(true), "dvi");
-
- if (target == "printer") {
- if (!lyxrc.print_spool_command.empty()) {
- // case 3: print using a spool
- string const psname = changeExtension(dviname,".ps");
- command += ' ' + lyxrc.print_to_file
- + quoteName(psname)
- + ' '
- + quoteName(dviname);
-
- string command2 = lyxrc.print_spool_command + ' ';
- if (target_name != "default") {
- command2 += lyxrc.print_spool_printerprefix
- + target_name
- + ' ';
- }
- command2 += quoteName(psname);
- // First run dvips.
- // If successful, then spool command
- res = one.startscript(Systemcall::Wait, command,
- filePath());
-
- if (res == 0) {
- // If there's no GUI, we have to wait on this command. Otherwise,
- // LyX deletes the temporary directory, and with it the spooled
- // file, before it can be printed!!
- Systemcall::Starttype stype = use_gui ?
- Systemcall::DontWait : Systemcall::Wait;
- res = one.startscript(stype, command2,
- filePath());
- }
- } else {
- // case 2: print directly to a printer
- if (target_name != "default")
- command += ' ' + lyxrc.print_to_printer + target_name + ' ';
- // as above....
- Systemcall::Starttype stype = use_gui ?
- Systemcall::DontWait : Systemcall::Wait;
- res = one.startscript(stype, command +
- quoteName(dviname), filePath());
- }
+ case LFUN_CHANGES_TRACK:
+ if (params().save_transient_properties)
+ undo().recordUndoBufferParams(CursorData());
+ params().track_changes = !params().track_changes;
+ if (!params().track_changes)
+ dr.forceChangesUpdate();
+ break;