From 998f374eb64afe9bb7006b4a55663ca5219082d0 Mon Sep 17 00:00:00 2001 From: Paolo Cignoni cignoni Date: Thu, 18 Jan 2007 13:35:02 +0000 Subject: [PATCH] Resolved crash when a edit-plugin is selected without a mesh. Resolves multiple-pushed edit-buttons problem. --- src/meshlab/mainwindow_RunTime.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/meshlab/mainwindow_RunTime.cpp b/src/meshlab/mainwindow_RunTime.cpp index 10f394da7..48a05d403 100644 --- a/src/meshlab/mainwindow_RunTime.cpp +++ b/src/meshlab/mainwindow_RunTime.cpp @@ -24,6 +24,10 @@ History $Log$ +Revision 1.115 2007/01/18 13:35:02 gfrei +Resolved crash when a edit-plugin is selected without a mesh. +Resolves multiple-pushed edit-buttons problem. + Revision 1.114 2006/12/27 21:41:41 pirosu Added improvements for the standard plugin window: split of the apply button in two buttons:ok and apply @@ -367,6 +371,14 @@ void MainWindow::endEditMode() } void MainWindow::applyEditMode() { + if(!GLA()) { //prevents crash without mesh + QAction *action = qobject_cast(sender()); + action->setChecked(false); + return; + } + if(GLA()->getEditAction()) { //prevents multiple buttons pushed + GLA()->getEditAction()->setChecked(false); + } QAction *action = qobject_cast(sender()); MeshEditInterface *iEdit = qobject_cast(action->parent()); GLA()->setEdit(iEdit,action);