summaryrefslogtreecommitdiff
path: root/fluid/Fd_Snap_Action.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2023-09-26 00:29:14 +0200
committerMatthias Melcher <github@matthiasm.com>2023-09-26 00:29:26 +0200
commit0a2f05a2fe2898ee1407319a6764018fdf54e562 (patch)
treec71eb3a9c9bbab15b38730bde6b0f4a429e62c02 /fluid/Fd_Snap_Action.cxx
parentb8fa522ca42407515f28dcdba4caddefe211ca27 (diff)
FLUID: Fixes regression #777
Wrote wrong path in #inlude statement under certain conditions. Also removed 'snap' tag if not needed.
Diffstat (limited to 'fluid/Fd_Snap_Action.cxx')
-rw-r--r--fluid/Fd_Snap_Action.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/fluid/Fd_Snap_Action.cxx b/fluid/Fd_Snap_Action.cxx
index c1ac3982b..3f52907ad 100644
--- a/fluid/Fd_Snap_Action.cxx
+++ b/fluid/Fd_Snap_Action.cxx
@@ -714,6 +714,14 @@ void Fd_Layout_List::read(Fl_Preferences &prefs, int storage) {
Write Suite and Layout selection and project layout data to an .fl project file.
*/
void Fd_Layout_List::write(Fd_Project_Writer *out) {
+ // Don't write the Snap field if no custom layout was used
+ if ((current_suite()==0) && (current_preset()==0)) {
+ int nSuite = 0;
+ for (int i=0; i<list_size_; i++) {
+ if (list_[i].storage_ == FD_STORE_PROJECT) nSuite++;
+ }
+ if (nSuite == 0) return;
+ }
out->write_string("\nsnap {\n ver 1\n");
out->write_string(" current_suite "); out->write_word(list_[current_suite()].name_); out->write_string("\n");
out->write_string(" current_preset %d\n", current_preset());