]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlInset.h
The reference dialog now disconnects from the inset on Apply. Its behaviour
[lyx.git] / src / frontends / controllers / ControlInset.h
index c1dce1f94025d39a39901868e886b580c218d838..755a4476df79dd459e6ffc36afc36cc56d4fb4d4 100644 (file)
@@ -46,7 +46,7 @@ protected:
        Inset * inset() const;
 
 private:
-       /** These 6 methods are all that the individual daughter classes
+       /** These 7 methods are all that the individual daughter classes
            should need to instantiate. */
 
        /// if the inset exists then do this...
@@ -67,6 +67,10 @@ private:
        /// clean-up any daughter class-particular data on hide().
        virtual void clearDaughterParams() {}
 
+       /** Some dialogs may find it beneficial to disconnect from the inset
+        when the Apply button is pressed. E.g., doing this with the citation
+        dialog allows multiple citiations to be inserted easily. */
+       virtual bool disconnectOnApply() { return false; }
 
 
        
@@ -195,7 +199,7 @@ void ControlInset<Inset, Params>::apply()
        else
                applyParamsNoInset();
 
-       if (!isClosing()) {
+       if (disconnectOnApply() && !isClosing()) {
                *params_ = getParams(string());
                inset_ = 0;
                ih_.disconnect();