Skip to content
Snippets Groups Projects
Commit 7488038e authored by Mikhail Svechnikov's avatar Mikhail Svechnikov
Browse files

MaskGraphicsScene: fix switching between data in mask mode

parent bac8d345
No related branches found
No related tags found
1 merge request!1339GUI: fix masks and projections
......@@ -183,9 +183,8 @@ void MaskGraphicsScene::cancelCurrentDrawing()
void MaskGraphicsScene::resetScene()
{
ASSERT(m_selectionModel);
m_block_selection = true;
m_selectionModel->clearSelection();
clearSelection();
clear();
......@@ -215,6 +214,9 @@ void MaskGraphicsScene::onSessionSelectionChanged(const QItemSelection&, const Q
if (m_block_selection)
return;
if (!m_selectionModel)
return;
m_block_selection = true;
for (auto it = m_ItemToView.begin(); it != m_ItemToView.end(); ++it) {
......@@ -232,6 +234,9 @@ void MaskGraphicsScene::onSceneSelectionChanged()
if (m_block_selection)
return;
if (!m_selectionModel)
return;
m_block_selection = true;
m_selectionModel->clearSelection();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment