From 55a01ca67944edd856bf94de5210b1bf3a18bfc4 Mon Sep 17 00:00:00 2001 From: Oscar Lesta Date: Sat, 16 Mar 2024 11:21:37 -0300 Subject: [PATCH] Save/Restore "Show invisibles" setting. Fixes #47. --- Sources/PText.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Sources/PText.cpp b/Sources/PText.cpp index 46fadaf..01146ae 100644 --- a/Sources/PText.cpp +++ b/Sources/PText.cpp @@ -465,6 +465,9 @@ void PText::ApplySettings(const BMessage& msg) if (msg.FindInt32("tabstop", &i) == B_OK) fTabStops = i; + if (msg.FindBool("show invisibles", &b) == B_OK) + fShowInvisibles = b; + if (gRestoreFont) { if (msg.FindBool("show tabs", &b) == B_OK) @@ -542,6 +545,8 @@ void PText::CollectSettings(BMessage& msg) FailOSErr(msg.AddInt32("tabstop", TabStops())); FailOSErr(msg.AddBool("show tabs", Doc()->ToolBar()->ShowsTabs())); + FailOSErr(msg.AddBool("show invisibles", fShowInvisibles)); + FailOSErr(msg.AddInt32("fontkind", fFontKind)); if (fFontKind == kIndividualFont) { font_family ff;