Skip to content

Instantly share code, notes, and snippets.

@jpcima
Created May 30, 2020 23:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpcima/cbbfc1c72df418f84a741406be2b49f3 to your computer and use it in GitHub Desktop.
Save jpcima/cbbfc1c72df418f84a741406be2b49f3 to your computer and use it in GitHub Desktop.
diff --git a/lib/src/view.cpp b/lib/src/view.cpp
index 1443bfa..da77160 100644
--- a/lib/src/view.cpp
+++ b/lib/src/view.cpp
@@ -67,13 +67,6 @@
_dirty = dirty_;
- // Update the limits and constrain the window size to the limits
- if (set_limits())
- {
- refresh();
- return;
- }
-
canvas cnv{ *context_ };
auto size_ = size();
rect subj_bounds = { 0, 0, size_.x, size_.y };
@@ -88,6 +81,12 @@
// draw the subject
_main_element.draw(ctx);
+
+ // Update the limits and constrain the window size to the limits
+ if (set_limits())
+ {
+ refresh();
+ }
}
namespace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment