Commit 3005a87a authored by Stéphane Albert's avatar Stéphane Albert

BUG: MANTIS-1248: Fixed delete last layer does not reset current & reference layer indices.

parent b68ebf27
...@@ -241,13 +241,13 @@ StackedLayerModel ...@@ -241,13 +241,13 @@ StackedLayerModel
// //
// Check if signals have to be emitted. // Check if signals have to be emitted.
bool emitCurrentChanged = m_Current<GetCount() && index<=m_Current; bool emitCurrentChanged = m_Current<GetCount() && index<m_Current;
bool emitReferenceChanged = m_Reference<GetCount() && index<=m_Reference; bool emitReferenceChanged = m_Reference<GetCount() && index<=m_Reference;
// //
// Remember new current index. // Remember new current index.
SizeType current = SizeType current =
index>=m_Current (index>=m_Current && GetCount()>0 )
? m_Current ? m_Current
: ( m_Current>0 : ( m_Current>0
? m_Current - 1 ? m_Current - 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment