mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user