]> git.lyx.org Git - features.git/blobdiff - src/cursor.C
change "support/std_sstream.h" to <sstream>
[features.git] / src / cursor.C
index dcefbe31812769a48acc86c24b6c996ef6967e01..82a0a58b31841afa25799a8b65fc474f6afe48bc 100644 (file)
 #include "mathed/math_macrotable.h"
 
 #include "support/limited_stack.h"
-#include "support/std_sstream.h"
 
 #include "frontends/LyXView.h"
 
 #include <boost/assert.hpp>
 
+#include <sstream>
+
 using lyx::par_type;
 
 using std::string;
@@ -85,7 +86,7 @@ void LCursor::setCursor(DocIterator const & cur, bool sel)
 
 DispatchResult LCursor::dispatch(FuncRequest const & cmd0)
 {
-       lyxerr << "\nLCursor::dispatch: cmd: " << cmd0 << endl << *this << endl;
+       lyxerr[Debug::DEBUG] << "LCursor::dispatch: cmd: " << cmd0 << endl << *this << endl;
        if (empty())
                return DispatchResult();
 
@@ -93,7 +94,7 @@ DispatchResult LCursor::dispatch(FuncRequest const & cmd0)
        LCursor safe = *this;
 
        for ( ; size(); pop()) {
-               //lyxerr << "\nLCursor::dispatch: cmd: " << cmd0 << endl << *this << endl;
+               //lyxerr << "LCursor::dispatch: cmd: " << cmd0 << endl << *this << endl;
                BOOST_ASSERT(pos() <= lastpos());
                BOOST_ASSERT(idx() <= lastidx());
                BOOST_ASSERT(par() <= lastpar());
@@ -110,7 +111,7 @@ DispatchResult LCursor::dispatch(FuncRequest const & cmd0)
        // it completely to get a 'bomb early' behaviour in case this
        // object will be used again.
        if (!disp_.dispatched()) {
-               lyxerr << "RESTORING OLD CURSOR!" << endl;
+               lyxerr[Debug::DEBUG] << "RESTORING OLD CURSOR!" << endl;
                operator=(safe);
                disp_.dispatched(false);
        }
@@ -386,14 +387,8 @@ void LCursor::info(std::ostream & os) const
 void LCursor::selHandle(bool sel)
 {
        //lyxerr << "LCursor::selHandle" << endl;
-       if (sel == selection()) {
-#ifdef WITH_WARNINGS
-#warning Alfredo: This is too strong (Andre)
-#endif
-               //if (!sel)
-               //      noUpdate();
+       if (sel == selection())
                return;
-       }
 
        resetAnchor();
        selection() = sel;