]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView_pimpl.C
Changed InsetText * in InsetCollapsable to be a InsetText.
[lyx.git] / src / BufferView_pimpl.C
index 9256cc994ece4c2d6b9fbdccb15c4b387c1ed896..4890ac972e91bbf4aa2a8a6715b722d3bd5d5023 100644 (file)
@@ -82,7 +82,6 @@ const unsigned int saved_positions_num = 20;
 
 namespace {
 
-//static
 inline
 void waitForX()
 {
@@ -90,7 +89,6 @@ void waitForX()
 }
 
 
-//static
 void SetXtermCursor(Window win)
 {
        static Cursor cursor;
@@ -923,6 +921,8 @@ Inset * BufferView::Pimpl::checkInsetHit(LyXText * text, int & x, int & y,
   
        LyXCursor cursor;
        text->SetCursorFromCoordinates(bv_, cursor, x, y_tmp);
+       text->SetCursor(bv_, cursor, cursor.par(),cursor.pos(),true);
+
 
 #ifndef NEW_INSETS
        if (cursor.pos() < cursor.par()->Last()
@@ -945,7 +945,8 @@ Inset * BufferView::Pimpl::checkInsetHit(LyXText * text, int & x, int & y,
 
                if (x > start_x && x < end_x
                    && y_tmp > cursor.y() - tmpinset->ascent(bv_, font)
-                   && y_tmp < cursor.y() + tmpinset->descent(bv_, font)) {
+                   && y_tmp < cursor.y() + tmpinset->descent(bv_, font))
+               {
                        text->SetCursor(bv_, cursor.par(),cursor.pos(),true);
                        x = x - start_x;
                        // The origin of an inset is on the baseline
@@ -2930,13 +2931,14 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument)
                if (!bv_->insertInset(inset, "Standard", true))
                        delete inset;
        }
+                
        break;
 
        case LFUN_CHILD_INSERT:
        {
-               InsetInclude::InsetIncludeParams p;
+               InsetInclude::Params p;
                p.cparams.setFromString(argument);
-               p.buffer = buffer_;
+               p.masterFilename_ = buffer_->fileName();
 
                InsetInclude * inset = new InsetInclude(p);
                if (!bv_->insertInset(inset))
@@ -3047,7 +3049,7 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument)
                } else {
                        // if we don't have an argument there was something
                        // strange going on so we just tell this to someone!
-                       owner_->getLyXFunc()->setErrorMessage(N_("No argument givven"));
+                       owner_->getLyXFunc()->setErrorMessage(N_("No argument given"));
                }
                break;
        }