mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-09-04 17:15:23 -06:00
RichEdit: Current style now preset in style manager
git-svn-id: svn://ultimatepp.org/upp/trunk@14389 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
66d3644b1f
commit
3c299ad2c6
3 changed files with 4 additions and 3 deletions
|
|
@ -454,7 +454,7 @@ void RichEdit::DisplayDefault::Paint(Draw& w, const Rect& r, const Value& q, Col
|
|||
DrawSmartText(w, r.left, r.top, r.Width(), text, StdFont().Bold(), ink);
|
||||
}
|
||||
|
||||
void StyleManager::Set(const RichText& text)
|
||||
void StyleManager::Set(const RichText& text, const Uuid& current)
|
||||
{
|
||||
list.Clear();
|
||||
int i;
|
||||
|
|
@ -469,6 +469,7 @@ void StyleManager::Set(const RichText& text)
|
|||
if(q >= 0)
|
||||
list.SetDisplay(q, 0, Single<RichEdit::DisplayDefault>());
|
||||
ReloadNextStyles();
|
||||
list.FindSetCursor(current);
|
||||
}
|
||||
|
||||
void StyleManager::Set(const char *qtf)
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ void RichEdit::Styles()
|
|||
NextUndo();
|
||||
StyleManager s;
|
||||
s.Setup(ffs, unit);
|
||||
s.Set(text);
|
||||
s.Set(text, formatinfo.styleid);
|
||||
if(s.Execute() != IDOK || !s.IsChanged())
|
||||
return;
|
||||
SaveStylesUndo();
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ private:
|
|||
typedef StyleManager CLASSNAME;
|
||||
|
||||
public:
|
||||
void Set(const RichText& text);
|
||||
void Set(const RichText& text, const Uuid& current = Null);
|
||||
void Set(const char *qtf);
|
||||
bool IsChanged() const;
|
||||
void Get(RichText& text);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue