]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlButtons.C
The reference dialog now disconnects from the inset on Apply. Its behaviour
[lyx.git] / src / frontends / controllers / ControlButtons.C
index 9453659548af38599341f28295a6418768ce2a7a..06f31205eb93c8cfcaa5e665c3039c5e3966bbd9 100644 (file)
 #include "ControlButtons.h"
 #include "ButtonControllerBase.h"
 #include "ViewBase.h"
+#include "lyxrc.h"
+
+ControlButtons::ControlButtons()
+       : is_closing_(false)
+{}
+
 
 void ControlButtons::ApplyButton()
 {
@@ -30,7 +36,9 @@ void ControlButtons::ApplyButton()
 
 void ControlButtons::OKButton()
 {
+       is_closing_ = true;
        apply();
+       is_closing_ = false;
        hide();
        bc().ok();
 }
@@ -48,3 +56,9 @@ void ControlButtons::RestoreButton()
        update();
        bc().restore();
 }
+
+
+bool ControlButtons::IconifyWithMain() const
+{
+        return lyxrc.dialogs_iconify_with_main;
+}