Jump to content

[SOLVED] WidgetCanvas's polygons disappear when they don't have to


photo

Recommended Posts

Posted

Hi! I use WidgetCanvas to create outlines like in tables. I also use WidgetScrollBox (to scroll table). So, the problem is: when one point of a polygon leaves visible area in scrollbox the whole polygon disappears. Is there any workaround? Or maybe I use canvas in a wrong way.. I've attached example code (when scrolling down very slowly you can notice that upper polygon disappears though it still has to be in its place).

Also I found out that Gui::CHANGED callback for scrollbox works only when mouse is pressed onto scrolls. How can I detect using only mouse wheel?

source.7z

Posted

Hello Natalya,

Thanks for the sample, we've reproduced the issue. 

I'll write you back as soon as I get an update from the colleagues. We're currently busy with 2.8 release, so it will take a little bit longer than usual (I believe one or two days).

 

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Posted

Both issues are bugs and, I'm afraid, we can't offer you a workaround right now.

May I ask you to explain, what exactly you want to do? Probably, there's another way to do this. And how urgent is this for your project?

Thank you.

 

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Posted (edited)

I'm trying to create a table class like in MS Excel (not through .ui but through C++ API). So the main idea is to create a container for widgets and draw borders around it. And I also need to scroll through this table (vertical and horizontal scrolls, example below).

image.thumb.png.e1dbb7500613371000796fb17ad900c7.png

I need it as soon as possible...

Edited by naumova.natalya
Posted

We've taken another look at this.

 

1. You can fix disappearing canvas polygon by deleting or commenting the following string: 

canvas->setPosition(10, 10);

2. Detecting mouse wheel can be done manually, by imitating a callback, for instance:

if (App::get()->getMouseAxis(App::AXIS_Y) != 0) {
   // Do something...
}

Then check if scrollbar position was changed in the same AppWorldLogic::update():

	if (scrollbox->getHScrollValue() != old_hscroll || scrollbox->getVScrollValue() != old_vscroll)
	{
		// Do something...
	}
	old_hscroll = scrollbox->getHScrollValue();
	old_vscroll = scrollbox->getVScrollValue();

Please, let us know if this works for you.

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Posted

it solves my problem, thank you!

  • morbid changed the title to [SOLVED] WidgetCanvas's polygons disappear when they don't have to
×
×
  • Create New...