diff libgui/src/shortcut-manager.h @ 19698:ff56a9899101

fix new shortcut dialog when applying new settings (fix #44196) * settings-dialog.cc (write_changed_settings): new boolean parameter whether settings dialog is closing or not, calling function for writing the shortcuts with this parameter; (button_clicked): calling write_changed_settings with new flag set to false when button with accept role was clicked * settings-dialog.h: write_changed_settings with boolean parameter * shortcut-manager.cc (do_write_shortcuts): delete shortcut dialog only if settings dialog is closing, setting to 0 after deletion; (do_import_export): call do_write_shortcuts with new flag * shortcut-manager.h: do_/write_shortcuts with new boolean parameter
author Torsten <ttl@justmail.de>
date Fri, 06 Feb 2015 22:55:01 +0100
parents 3f6280d0a36b
children 4197fc428c7d
line wrap: on
line diff
--- a/libgui/src/shortcut-manager.h	Fri Feb 06 13:06:54 2015 -0500
+++ b/libgui/src/shortcut-manager.h	Fri Feb 06 22:55:01 2015 +0100
@@ -63,10 +63,10 @@
       instance->do_init_data ();
   }
 
-  static void write_shortcuts (int set, QSettings *settings)
+  static void write_shortcuts (int set, QSettings *settings, bool closing)
   {
     if (instance_ok ())
-      instance->do_write_shortcuts (set, settings);
+      instance->do_write_shortcuts (set, settings, closing);
   }
 
   static void set_shortcut (QAction *action, const QString& key)
@@ -113,7 +113,7 @@
 
   void init (QString, QString, QKeySequence);
   void do_init_data ();
-  void do_write_shortcuts (int set, QSettings *settings);
+  void do_write_shortcuts (int set, QSettings *settings, bool closing);
   void do_set_shortcut (QAction *action, const QString& key);
   void do_fill_treewidget (QTreeWidget *tree_view);
   void do_import_export (bool import, int set);