[Uml-devel] [Bug 93696] setting zoom without any diagram

Jonathan Riddell jr at jriddell.org
Tue Nov 23 14:26:04 UTC 2004


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
        
http://bugs.kde.org/show_bug.cgi?id=93696        
jr jriddell org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From jr jriddell org  2004-11-23 23:25 -------
CVS commit by jriddell: 

Don't allow no diagram
BUG:93696


  M +1 -0      umldoc.cpp   1.207
  M +7 -4      dialogs/settingsdlg.cpp   1.35


--- kdesdk/umbrello/umbrello/umldoc.cpp  #1.206:1.207
 @ -311,4 +311,5  @ bool UMLDoc::newDocument() {
                         break;
 
+                case Settings::diagram_no: //don't allow no diagram
                 case Settings::diagram_class:
                         createDiagram( Uml::dt_Class, false );

--- kdesdk/umbrello/umbrello/dialogs/settingsdlg.cpp  #1.34:1.35
 @ -168,8 +168,11  @ void SettingsDlg::setupGeneralPage() {
                                 i18n("Activity Diagram"), i18n("Component Diagram"),
                                 i18n("Deployment Diagram") };
-        for( int i=0; i<9; i++)
-                m_GeneralWidgets.diagramKB -> insertItem( diagrams[i] );
 
-        m_GeneralWidgets.diagramKB -> setCurrentItem( (int) m_pOptionState->generalState.diagram );
+        //start at 1 because we don't allow No Diagram any more
+        for (int i=1; i<9; i++) {
+                m_GeneralWidgets.diagramKB->insertItem( diagrams[i] );
+        }
+
+        m_GeneralWidgets.diagramKB->setCurrentItem( (int)m_pOptionState->generalState.diagram-1 );
         connect( m_GeneralWidgets.autosaveCB, SIGNAL(clicked()), this, SLOT(slotAutosaveCBClicked()) );
 }
 @ -337,5 +340,5  @ void SettingsDlg::applyPage( Settings::P
                         m_pOptionState->generalState.tip = m_GeneralWidgets.tipCB -> isChecked();
                         m_pOptionState->generalState.loadlast = m_GeneralWidgets.loadlastCB -> isChecked();
-                        m_pOptionState->generalState.diagram  = ( Settings::Diagram ) m_GeneralWidgets.diagramKB -> currentItem();
+                        m_pOptionState->generalState.diagram  = (Settings::Diagram)(m_GeneralWidgets.diagramKB->currentItem() + 1);
                         break;




More information about the umbrello-devel mailing list