mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +00:00
fix #1360
* lyxfunc.C: * text3.C: move handling of LFUN_DEPTH *; git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7853 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f23b0a7712
commit
b9a8b8f4b6
@ -1,11 +1,16 @@
|
||||
|
||||
2003-10-02 André Pönitz <poenitz@gmx.net>
|
||||
|
||||
* lyxfunc.C:
|
||||
* text3.C: move handling of LFUN_DEPTH *; fix #1360
|
||||
|
||||
2003-10-01 André Pönitz <poenitz@gmx.net>
|
||||
|
||||
* factory.C: assert early
|
||||
|
||||
2003-09-26 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* lyx_main.C: remove the glboal debug object
|
||||
* lyx_main.C: remove the global debug object
|
||||
|
||||
* debug.h: adjust for new debugstream
|
||||
|
||||
|
@ -72,7 +72,6 @@
|
||||
#include "support/path.h"
|
||||
#include "support/path_defines.h"
|
||||
#include "support/tostr.h"
|
||||
|
||||
#include "support/std_sstream.h"
|
||||
|
||||
using bv_funcs::apply_freefont;
|
||||
@ -1202,16 +1201,6 @@ void LyXFunc::dispatch(FuncRequest const & func, bool verbose)
|
||||
view()->redo();
|
||||
break;
|
||||
|
||||
case LFUN_DEPTH_MIN:
|
||||
changeDepth(view(), view()->getLyXText(), DEC_DEPTH, false);
|
||||
owner->view_state_changed();
|
||||
break;
|
||||
|
||||
case LFUN_DEPTH_PLUS:
|
||||
changeDepth(view(), view()->getLyXText(), INC_DEPTH, false);
|
||||
owner->view_state_changed();
|
||||
break;
|
||||
|
||||
case LFUN_FREEFONT_APPLY:
|
||||
apply_freefont(view());
|
||||
break;
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "mathed/math_support.h"
|
||||
#include "frontends/Painter.h"
|
||||
#include "BufferView.h"
|
||||
#include "LColor.h"
|
||||
|
||||
|
||||
|
||||
@ -147,6 +148,7 @@ FontSetChanger::FontSetChanger(MetricsBase & mb, char const * name)
|
||||
augmentFont(mb.font, name);
|
||||
}
|
||||
|
||||
|
||||
FontSetChanger::~FontSetChanger()
|
||||
{
|
||||
orig_ = save_;
|
||||
@ -165,3 +167,21 @@ WidthChanger::~WidthChanger()
|
||||
{
|
||||
orig_ = save_;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
ColorChanger::ColorChanger(LyXFont & font, string const & color)
|
||||
: Changer<LyXFont, string>(font)
|
||||
{
|
||||
save_ = lcolor.getFromGUIName(color);
|
||||
font.setColor(lcolor.getFromGUIName(color));
|
||||
}
|
||||
|
||||
|
||||
ColorChanger::~ColorChanger()
|
||||
{
|
||||
orig_.setColor(lcolor.getFromGUIName(save_));
|
||||
}
|
||||
|
||||
|
||||
|
@ -175,4 +175,12 @@ struct WidthChanger : public Changer<MetricsBase>
|
||||
};
|
||||
|
||||
|
||||
// temporarily change the used color
|
||||
struct ColorChanger : public Changer<LyXFont, string> {
|
||||
///
|
||||
ColorChanger(LyXFont & font, string const & color);
|
||||
///
|
||||
~ColorChanger();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
13
src/text3.C
13
src/text3.C
@ -1534,6 +1534,19 @@ InsetOld::RESULT LyXText::dispatch(FuncRequest const & cmd)
|
||||
doInsertInset(this, cmd, false, false);
|
||||
break;
|
||||
|
||||
case LFUN_DEPTH_MIN:
|
||||
bv_funcs::changeDepth(bv, this, bv_funcs::DEC_DEPTH, false);
|
||||
clearSelection();
|
||||
bv->update();
|
||||
break;
|
||||
|
||||
case LFUN_DEPTH_PLUS:
|
||||
clearSelection();
|
||||
bv_funcs::changeDepth(bv, this, bv_funcs::INC_DEPTH, false);
|
||||
clearSelection();
|
||||
bv->update();
|
||||
break;
|
||||
|
||||
default:
|
||||
return UNDISPATCHED;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user