- One more PDCurses update -- I think I added some bad binaries last

night.
- A couple bug fixes with Window::Move and Window::SetSize
This commit is contained in:
casey langen 2016-12-07 14:23:51 -08:00
parent 85c101ca54
commit ec2632431a
3 changed files with 6 additions and 8 deletions

Binary file not shown.

Binary file not shown.

View File

@ -217,7 +217,7 @@ void Window::SetSize(int width, int height) {
this->width = width;
this->height = height;
if (this->frame) {
if (this->frame || this->isVisible) {
this->Recreate();
}
@ -230,7 +230,7 @@ void Window::SetPosition(int x, int y) {
this->x = x;
this->y = y;
if (this->frame) {
if (this->frame || this->isVisible) {
this->Recreate();
}
@ -447,17 +447,15 @@ bool Window::CheckForBoundsError() {
}
void Window::Create() {
/* see if the window is valid within the screen, and within it's parent.
if not, draw it as a single cell red block. */
assert(this->frame == nullptr);
assert(this->content == nullptr);
assert(this->framePanel == nullptr);
assert(this->contentPanel == nullptr);
bool hadBadBounds = this->badBounds;
this->badBounds = this->CheckForBoundsError();
if (this->badBounds) {
//this->frame = this->content = newwin(1, 1, 0, 0);
//wbkgd(this->frame, COLOR_PAIR(CURSESPP_BUTTON_NEGATIVE));
//this->framePanel = new_panel(this->frame);
//return;
this->Destroy();
return;
}