lyxerr[Debug::INFO] << "BufferView::redoCurrentBuffer" << endl;
if (buffer_ && bv_->text) {
resizeCurrentBuffer();
+ updateScrollbar();
owner_->updateLayoutChoice();
repaint();
}
switchKeyMap();
owner_->allowInput();
- /// clear the "Formatting Document" message
- owner_->message("");
-
+ updateScrollbar();
+
return 0;
}
/* This will fit the cursor on the screen
* if necessary */
update(text, BufferView::SELECT|BufferView::FITCUR);
+ workarea().haveSelection(bv_->getLyXText()->selection.set());
}
}
/* This will fit the cursor on the screen
* if necessary */
update(text, BufferView::SELECT|BufferView::FITCUR);
+ workarea().haveSelection(bv_->getLyXText()->selection.set());
}
}
#include <map>
#include <vector>
-///
+/// This represents a single counter.
class Counter {
public:
///
void step();
///
void reset();
- ///
+ /// Returns the master counter of this counter
string master() const;
- ///
+ /// sets the master counter for this counter
void setMaster(string const & m);
///
private:
int value_;
- ///
+ /// contains master counter name; master counter is the counter
+ /// that, if stepped (incremented) zeroes this counter. E.g.
+ /// "subparagraph"'s master is "paragraph".
string master_;
};
-/** This is a class of (La)TeX type counters. The counters is in a text
- Style and can be reset by signals emitted from a single counter.
-*/
+/// This is a class of (La)TeX type counters.
+/// Every instantiation is an array of counters of type Counter.
class Counters {
public:
///
Counters();
///
//~Counters();
- ///
+ /// Add a new counter to array.
void newCounter(string const & newc);
- ///
+ /// Add new counter having oldc as its master.
void newCounter(string const & newc, string const & oldc);
///
void set(string const & ctr, int val);
void addto(string const & ctr, int val);
///
int value(string const & ctr) const;
- ///
+ /// Step (increment by one) counter named by arg, and
+ /// zeroes slave counter(s) for which it is the master.
+ /// NOTE sub-slaves not zeroed! That happens at slave's
+ /// first step 0->1. Seems to be sufficient.
void step(string const & ctr);
- ///
- void reset(string const & match = "");
- ///
- void copy(Counters & from, Counters & to, string const & match = "");
- ///
+ /// Reset counters matched by match string. Empty string matches
+ /// all.
+ void reset(string const & match = string());
+ /// Copy counters whose name matches match from the &from to
+ /// the &to array of counters. Empty string matches all.
+ void copy(Counters & from, Counters & to, string const & match = string());
+ /// A numeric label's single item, like .1 for subsection number in
+ /// the 2.1.4 subsubsection number label. "first" indicates if this
+ /// is the first item to be displayed, usually chapter or section.
string labelItem(string const & ctr,
string const & labeltype,
string const & langtype = "latin",
bool first = false);
- ///
+ /// A complete numeric label, like 2.1.4 for a subsubsection.
+ /// "head" indicates sequence number of first item to be
+ /// displayed, e.g. 0 for chapter, 1 for section.
string numberLabel(string const & ctr,
string const & labeltype,
string const & langtype = "latin",
int head = 0);
- ///
- std::vector<string> enums, sects;
+ /// Maps numbers to enumeration of sectioning counter name strings.
+ std::vector<string> enums;
+ std::vector<string> sects;
private:
- ///
+ /// Maps counter (layout) names to actual counters.
typedef std::map<string, Counter> CounterList;
- ///
+ /// Instantiate.
CounterList counterList;
};
case LFUN_SCREEN_FONT_UPDATE:
{
// handle the screen font changes.
- //
lyxrc.set_font_norm_type();
lyx_gui::update_fonts();
+ // We also need to empty the textcache so that
+ // the buffer will be formatted correctly after
+ // a zoom change.
+ textcache.clear();
// Of course we should only do the resize and the textcache.clear
// if values really changed...but not very important right now. (Lgb)
// All visible buffers will need resize
owner->view()->resize();
owner->view()->repaint();
- // We also need to empty the textcache so that
- // the buffer will be formatted correctly after
- // a zoom change.
- textcache.clear();
}
break;