mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 21:27:01 -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
|
// ----------------------------------------------------------------------------- : Drawing
|
||||||
|
|
||||||
void TextValueEditor::draw(RotatedDC& dc) {
|
void TextValueEditor::draw(RotatedDC& dc) {
|
||||||
|
if (nativeLook()) {
|
||||||
|
// clip the dc to the region of this control
|
||||||
|
dc.SetClippingRegion(style().getInternalRect());
|
||||||
|
}
|
||||||
// update scrollbar
|
// update scrollbar
|
||||||
prepareDrawScrollbar(dc);
|
prepareDrawScrollbar(dc);
|
||||||
// draw text
|
// draw text
|
||||||
@@ -574,6 +578,9 @@ void TextValueEditor::draw(RotatedDC& dc) {
|
|||||||
fixSelection();
|
fixSelection();
|
||||||
showCaret();
|
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) {
|
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