Page 1 of 1

Freeze when cancel segmentation

Posted: Fri Jun 25, 2021 10:38 pm
by DA523
If you cancel segmentation tool (scissors)
CC will freeze only some functions works
but it freezes
You can not close CC etc

CC 2.12 Alpha (windows 10-64 msvc 1916 qt 5.15.2)

Re: Freeze when cancel segmentation

Posted: Sun Jun 27, 2021 9:56 am
by daniel
I can't reproduce this issue.

Can you on your side? If yes, can you share the file and the exact procedure with us? (admin [at] cloudcompare.org)

Re: Freeze when cancel segmentation

Posted: Fri Jul 09, 2021 3:46 pm
by DA523
1- Left mouse click to select area around vertices
2- Before mouse right click to close selection polygon around vertices, press ESC on keyboard to cancel
then CC will partially freezes and it is reproducible

Re: Freeze when cancel segmentation

Posted: Fri Jul 09, 2021 6:00 pm
by WargodHernandez
I've tested with both clouds and meshes and am not able to reproduce, does this always happen with a specific cloud or mesh? If so can you share so we can track down the issue?

Re: Freeze when cancel segmentation

Posted: Fri Jul 09, 2021 6:11 pm
by DA523
It happened with all clouds at least in my PC
an example cloud is attached
please remember to cancel with keyboard ESC before mouse right click

Re: Freeze when cancel segmentation

Posted: Fri Jul 09, 2021 6:32 pm
by WargodHernandez
Ah I was able to reproduce, first test I thought you meant to right click before esc.

I'll look into it.

Re: Freeze when cancel segmentation

Posted: Fri Jul 09, 2021 6:47 pm
by WargodHernandez
I'll submit a fix today, just need to add closePolyLine(); to the escape key

Code: Select all

case Qt::Key_Escape:
		closePolyLine();
		cancelButton->click();
		return;
This fixed the issue as far as I can tell.

or just directly release the mouse inside the reset function

Code: Select all

void ccGraphicalSegmentationTool::reset()
{
	if (m_somethingHasChanged)
	{
		for (QSet<ccHObject*>::const_iterator p = m_toSegment.constBegin(); p != m_toSegment.constEnd(); ++p)
		{
			ccHObjectCaster::ToGenericPointCloud(*p)->resetVisibilityArray();
		}

		if (m_associatedWin)
		{
			m_associatedWin->redraw(false);
			m_associatedWin->releaseMouse();
		}
		m_somethingHasChanged = false;
	}

	razButton->setEnabled(false);
	validButton->setEnabled(false);
	validAndDeleteButton->setEnabled(false);
	loadSaveToolButton->setDefaultAction(actionUseExistingPolyline);
}

Re: Freeze when cancel segmentation

Posted: Fri Jul 09, 2021 7:11 pm
by WargodHernandez

Re: Freeze when cancel segmentation

Posted: Sun Jul 11, 2021 7:15 pm
by daniel
And I've just updated the latest Windows 2.12.alpha version online!