Bug fix: When switching to a source that has no mapping attached to it, last selected mapping was still in use

This commit is contained in:
Tats
2013-12-01 13:43:24 -05:00
parent 8d0473410b
commit cf95edaf6f

View File

@@ -60,6 +60,7 @@ void MainWindow::handleSourceItemSelectionChanged()
// Reconstruct shape item list.
shapeList->clear();
setCurrentMapping(-1); // de-select current mapping to avoid being stuck with the last selection
// Retrieve all mappings associated to paint.
std::map<int, Mapping::ptr> mappings = getMappingManager().getPaintMappings(idx);
for (std::map<int, Mapping::ptr>::iterator it = mappings.begin(); it != mappings.end(); ++it)