Fixed: Text sometimes overflows out of text fields, such as comments areas, reminder text areas, and rules text areas:

added a clipping region when in native look

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@865 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2008-05-18 20:15:38 +00:00
parent c3a7a350bb
commit b8b2632baa
+7
View File
@@ -559,6 +559,10 @@ wxMenu* TextValueEditor::getMenu(int type) const {
// ----------------------------------------------------------------------------- : Drawing
void TextValueEditor::draw(RotatedDC& dc) {
if (nativeLook()) {
// clip the dc to the region of this control
dc.SetClippingRegion(style().getInternalRect());
}
// update scrollbar
prepareDrawScrollbar(dc);
// draw text
@@ -574,6 +578,9 @@ void TextValueEditor::draw(RotatedDC& dc) {
fixSelection();
showCaret();
}
if (nativeLook()) {
dc.DestroyClippingRegion();
}
}
void TextValueEditor::redrawSelection(size_t old_selection_start_i, size_t old_selection_end_i, bool old_drop_down_shown) {