]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlDialogs.h
John's character.C patch (bug fix).
[lyx.git] / src / frontends / controllers / ControlDialogs.h
index 0bfea6048babe9525a998ee093f2b486d4f01599..65d87f3101f9d783cd21ac509b38896fc684e5ac 100644 (file)
@@ -1,3 +1,4 @@
+// -*- C++ -*-
 /* This file is part of
  * ====================================================== 
  *
  * \file ControlDialogs.h
  * \author Angus Leeming <a.leeming@ic.ac.uk>
  *
- * ControlDialog is to be used as a parent class for popups that are not
- * Inset-popups. (An ugly description I know, but I hope the meaning is clear!
- * Can anyone do any better?) Examples would be the Document and Paragraph
- * popups.
+ * ControlDialog is to be used as a parent class for dialogs that are not
+ * views onto parameters of insets. (An ugly description I know, but I hope 
+ * the meaning is clear!  * Can anyone do any better?) Examples would be the 
+ * Document and Paragraph dialogs.
  */
 
 #ifndef CONTROLDIALOGS_H
@@ -49,7 +50,6 @@ protected:
 
 #include "LyXView.h"
 
-
 template <class Base>
 ControlDialog<Base>::ControlDialog(LyXView & lv, Dialogs & d)
        : Base(lv, d)
@@ -64,6 +64,12 @@ void ControlDialog<Base>::show()
 
        setParams();
 
+       static bool isBuilt = false;
+       if (!isBuilt) {
+               isBuilt = true;
+               view().build();
+       }
+
        bc().readOnly(isReadonly());
        view().show();
 }
@@ -75,8 +81,12 @@ void ControlDialog<Base>::update()
                return;
 
        setParams();
-       
+
        bc().readOnly(isReadonly());
+       // Reset the Button Controller to it's initial state
+       bc().invalid();
+       bc().restore();
+
        view().update();
 }