changeset 29205:5749eec4e2f2

maint: merge stable to default.
author Markus Mützel <markus.muetzel@gmx.de>
date Sun, 20 Dec 2020 14:24:20 +0100
parents 66af654b3485 (current diff) 21dddfdaa636 (diff)
children a0a892829b6d
files libgui/src/m-editor/file-editor-tab.cc scripts/plot/util/hdl2struct.m scripts/plot/util/hgsave.m
diffstat 3 files changed, 6 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.cc	Sun Dec 20 12:06:59 2020 +0100
+++ b/libgui/src/m-editor/file-editor-tab.cc	Sun Dec 20 14:24:20 2020 +0100
@@ -2088,7 +2088,7 @@
     update_lexer ();
 
     m_edit_area->setText (commands);
-    m_edit_area->setModified (false); // new file is not modified yet
+    m_edit_area->setModified (!commands.isEmpty ());
   }
 
   void file_editor_tab::confirm_dbquit_and_save (const QString& file_to_save,
--- a/scripts/plot/util/hdl2struct.m	Sun Dec 20 12:06:59 2020 +0100
+++ b/scripts/plot/util/hdl2struct.m	Sun Dec 20 14:24:20 2020 +0100
@@ -155,7 +155,9 @@
   propstruct = rmfield (obj, fields(tf));
 
   ## hidden properties
-  hidden_props = {"__autopos_tag__", "looseinset"};
+  hidden_props = {"__autopos_tag__", "looseinset", ...
+                  "positionmode", "rotationmode", ...
+                  "horizontalalignmentmode", "verticalalignmentmode"};
   for prop = hidden_props
     try
       val = get (h, prop{1});
--- a/scripts/plot/util/hgsave.m	Sun Dec 20 12:06:59 2020 +0100
+++ b/scripts/plot/util/hgsave.m	Sun Dec 20 14:24:20 2020 +0100
@@ -90,12 +90,9 @@
 endfunction
 
 
-## FIXME: Have to use gnuplot for printing figs that have never been visible.
-%!testif HAVE_MAGICK; any (strcmp ("gnuplot", available_graphics_toolkits ()))
-%! toolkit = graphics_toolkit ();
-%! graphics_toolkit ("gnuplot");
+%!testif HAVE_MAGICK; (have_window_system () && __have_feature__ ("QT_OFFSCREEN") && strcmp ("qt", graphics_toolkit ())) || strcmp ("gnuplot", graphics_toolkit ());
+%! h1 = figure ("visible", "off", "paperposition", [0.25, 2.5, 8.0, 6.0]);
 %! unwind_protect
-%!   h1 = figure ("visible", "off", "paperposition", [0.25, 2.5, 8.0, 6.0]);
 %!   x = 0:0.1:2*pi;
 %!   y1 = sin (x);
 %!   y2 = exp (x - 1);
@@ -130,7 +127,6 @@
 %! unwind_protect_cleanup
 %!   close (h1);
 %!   close (h2);
-%!   graphics_toolkit (toolkit);
 %! end_unwind_protect
 
 ## Test input validation