[Uml-devel] kdesdk/umbrello/umbrello

Jonathan Riddell jri at jriddell.org
Tue Aug 26 10:53:09 UTC 2003


CVS commit by jriddell: 

Disable printing when there are no diagrams. This caused a crash previously.


  M +3 -1      uml.cpp   1.50


--- kdesdk/umbrello/umbrello/uml.cpp  #1.49:1.50
@@ -916,6 +916,7 @@ void UMLApp::setModified(bool _m) {
 
         // printing should be possible whenever there is something to print
-        if (_m == true)
+        if ( _m == true && doc->getCurrentView() )  {
                 enablePrint(true);
+        }
 }
 ////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1200,4 +1201,5 @@ void UMLApp::setDiagramMenuItemsState(bo
         viewExportImage->setEnabled( bState );
         viewProperties->setEnabled( bState );
+        filePrint->setEnabled( bState );
         if ( doc->getCurrentView() ) {
                 viewSnapToGrid->setChecked( doc->getCurrentView()->getSnapToGrid() );






More information about the umbrello-devel mailing list