]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlDialog.tmpl
port the graphics dialog to the new scheme and get rid of the ControlInset
[lyx.git] / src / frontends / controllers / ControlDialog.tmpl
index 58690f7f7db4d87399385881cf22da7ebec75de5..dffa2e7ecc856ab40f91865f510f039035c574bb 100644 (file)
@@ -1,9 +1,10 @@
 // -*- C++ -*-
 /**
  * \file ControlDialog.tmpl
- * Read the file COPYING
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- * \author Angus Leeming 
+ * \author Angus Leeming
  *
  * Full author contact details are available in file CREDITS
  *
@@ -31,19 +32,22 @@ void ControlDialog<Base>::show()
 
        connect();
 
+       if (!dialog_built_) {
+               view().build();
+               dialog_built_ = true;
+       }
+
        setParams();
        if (emergency_exit_) {
                hide();
                return;
        }
 
-       if (!dialog_built_) {
-               view().build();
-               dialog_built_ = true;
-       }
-
        bc().readOnly(bufferIsReadonly());
        view().show();
+
+       // The widgets may not be valid, so refresh the button controller
+       bc().refresh();
 }
 
 template <class Base>
@@ -60,6 +64,9 @@ void ControlDialog<Base>::update()
 
        bc().readOnly(bufferIsReadonly());
        view().update();
+
+       // The widgets may not be valid, so refresh the button controller
+       bc().refresh();
 }
 
 template <class Base>