]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetVSpace.cpp
Make logic clearer, with help from Lars.
[lyx.git] / src / insets / InsetVSpace.cpp
index fb0c8dbe875b27cf7bd626abbcd368ca02631f88..70b9d6abb22add448066984bb6f22041f264c338 100644 (file)
@@ -20,7 +20,7 @@
 #include "gettext.h"
 #include "Color.h"
 #include "Lexer.h"
-#include "LyXText.h"
+#include "Text.h"
 #include "MetricsInfo.h"
 #include "OutputParams.h"
 
@@ -57,9 +57,9 @@ InsetVSpace::~InsetVSpace()
 }
 
 
-std::auto_ptr<InsetBase> InsetVSpace::doClone() const
+std::auto_ptr<Inset> InsetVSpace::doClone() const
 {
-       return std::auto_ptr<InsetBase>(new InsetVSpace(*this));
+       return std::auto_ptr<Inset>(new InsetVSpace(*this));
 }
 
 
@@ -73,11 +73,12 @@ void InsetVSpace::doDispatch(Cursor & cur, FuncRequest & cmd)
        }
 
        case LFUN_MOUSE_RELEASE:
-               InsetVSpaceMailer(*this).showDialog(&cur.bv());
+               if (!cur.selection())
+                       InsetVSpaceMailer(*this).showDialog(&cur.bv());
                break;
 
        default:
-               InsetBase::doDispatch(cur, cmd);
+               Inset::doDispatch(cur, cmd);
                break;
        }
 }
@@ -123,7 +124,7 @@ bool InsetVSpace::metrics(MetricsInfo & mi, Dimension & dim) const
        if (space_.length().len().value() >= 0.0)
                height = max(height, space_.inPixels(*mi.base.bv));
 
-       LyXFont font;
+       Font font;
        font.decSize();
        font.decSize();
 
@@ -178,7 +179,7 @@ void InsetVSpace::draw(PainterInfo & pi, int x, int y) const
        int a = 0;
        int d = 0;
 
-       LyXFont font;
+       Font font;
        font.setColor(Color::added_space);
        font.decSize();
        font.decSize();