Mercurial > libervia-desktop-kivy
comparison cagou/core/widgets_handler.py @ 160:916af9c1cb9b
widget handler: don't set split delete mode if there is not top/left widget
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 28 Apr 2018 10:57:17 +0200 |
parents | a0e486074d91 |
children | ef09dce878c7 |
comparison
equal
deleted
inserted
replaced
159:8ed389d15690 | 160:916af9c1cb9b |
---|---|
180 top = next(iter(self._top_wids)) | 180 top = next(iter(self._top_wids)) |
181 y_limit = top.y + top.height | 181 y_limit = top.y + top.height |
182 | 182 |
183 if top.height <= REMOVE_WID_LIMIT: | 183 if top.height <= REMOVE_WID_LIMIT: |
184 # we are in remove zone, we add visual hint for that | 184 # we are in remove zone, we add visual hint for that |
185 if not self._split_del: | 185 if not self._split_del and self._top_wids: |
186 self._split_del = True | 186 self._split_del = True |
187 self._draw_ellipse() | 187 self._draw_ellipse() |
188 else: | 188 else: |
189 if self._split_del: | 189 if self._split_del: |
190 self._split_del = False | 190 self._split_del = False |
225 left = next(iter(self._left_wids)) | 225 left = next(iter(self._left_wids)) |
226 x_limit = left.x | 226 x_limit = left.x |
227 | 227 |
228 if left.width <= REMOVE_WID_LIMIT: | 228 if left.width <= REMOVE_WID_LIMIT: |
229 # we are in remove zone, we add visual hint for that | 229 # we are in remove zone, we add visual hint for that |
230 if not self._split_del: | 230 if not self._split_del and self._left_wids: |
231 self._split_del = True | 231 self._split_del = True |
232 self._draw_ellipse() | 232 self._draw_ellipse() |
233 else: | 233 else: |
234 if self._split_del: | 234 if self._split_del: |
235 self._split_del = False | 235 self._split_del = False |