Bug Fix: Clicking the zoom toolbars button of the output panel while there is no mesh present will crash the software.

This commit is contained in:
baydam
2016-07-07 23:06:55 +00:00
parent 17779a4256
commit 20da2b173e
3 changed files with 13 additions and 6 deletions

View File

@@ -137,7 +137,6 @@ void MainWindow::handlePaintItemSelectionChanged()
addEllipseAction->setEnabled(paintItemSelected);
// Enable some menus and buttons
sourceCanvasToolbar->enableZoomToolBar(paintItemSelected);
destinationCanvasToolbar->enableZoomToolBar(paintItemSelected);
sourceMenu->setEnabled(paintItemSelected);
// Update canvases.
@@ -153,6 +152,9 @@ void MainWindow::handleMappingItemSelectionChanged(const QModelIndex &index)
// Set current mapping and paint
setCurrentMapping(mappingId);
setCurrentPaint(paintId);
// Enable destination zoom toolbar buttons and avoid loop
if (!destinationCanvasToolbar->buttonsAreEnable())
destinationCanvasToolbar->enableZoomToolBar(true);
// Update canvases.
updateCanvases();