fix - reset the margin of the selected annotation on pin/save/copy/upload operations (#2170)

Co-authored-by: Yuriy Puchkov <yuriy.puchkov@namecheap.com>
This commit is contained in:
Yurii Puchkov
2021-12-20 21:26:24 +02:00
committed by GitHub
parent b65bc6cd8e
commit a9b56911f8
7 changed files with 17 additions and 3 deletions

View File

@@ -1143,6 +1143,12 @@ void CaptureWidget::handleToolSignal(CaptureTool::Request r)
case CaptureTool::REQ_CAPTURE_DONE_OK:
m_captureDone = true;
break;
case CaptureTool::REQ_CLEAR_SELECTION:
if (m_panel->activeLayerIndex() >= 0) {
m_panel->setActiveLayer(-1);
drawToolsData(false);
}
break;
case CaptureTool::REQ_ADD_CHILD_WIDGET:
if (!m_activeTool) {
break;
@@ -1470,7 +1476,7 @@ void CaptureWidget::pushToolToStack()
}
}
void CaptureWidget::drawToolsData()
void CaptureWidget::drawToolsData(bool drawSelection)
{
// TODO refactor this for performance. The objects should not all be updated
// at once every time
@@ -1485,7 +1491,9 @@ void CaptureWidget::drawToolsData()
}
m_context.screenshot = pixmapItem;
drawObjectSelection();
if (drawSelection) {
drawObjectSelection();
}
}
void CaptureWidget::drawObjectSelection()