| 297 | } |
| 298 | |
| 299 | void VariablesHolder::saveExpandedState( const ModelIndex& index, bool uniqueLocation ) { |
| 300 | Lock l( mModel->resourceMutex() ); |
| 301 | if ( !mCurrentLocation && !uniqueLocation ) |
| 302 | return; |
| 303 | |
| 304 | ModelVariableNode* node = static_cast<ModelVariableNode*>( index.internalData() ); |
| 305 | if ( !node ) |
| 306 | return; |
| 307 | |
| 308 | auto nodePath = buildVariablePath( node ); |
| 309 | |
| 310 | ExpandedState::Location location = |
| 311 | uniqueLocation ? ExpandedState::Location{} : *mCurrentLocation; |
| 312 | |
| 313 | mExpandedStates[location].insert( std::move( nodePath ) ); |
| 314 | } |
| 315 | |
| 316 | void VariablesHolder::removeExpandedState( const ModelIndex& index, bool uniqueLocation ) { |
| 317 | Lock l( mModel->resourceMutex() ); |
no test coverage detected