Summary: | Format/Stencils and Connectors option should be disabled when text is selected | ||
---|---|---|---|
Product: | [Applications] calligraflow | Reporter: | Ben Lamb <kdebugs> |
Component: | general | Assignee: | Peter Simonsson <peter.simonsson> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Ben Lamb
2003-07-04 21:07:54 UTC
Subject: koffice/kivio CVS commit by frauke: Fixed bug #60762 : "Format/Stencils and Connectors option should be disabled when text is selected" CCMAIL: 60762-done@bugs.kde.org M +19 -2 kiviopart/kivio_view.cpp 1.108 M +2 -0 kiviopart/kivio_view.h 1.38 M +2 -1 kiviopart/kiviosdk/kivio_stencil.h 1.16 M +1 -0 plugins/kiviotexttool/tool_text.cpp 1.23 --- koffice/kivio/kiviopart/kivio_view.cpp #1.107:1.108 @@ -396,8 +396,8 @@ void KivioView::setupActions() (void) new KAction( i18n("Send to Back"), "send_stencil_to_back", 0, this, SLOT(sendStencilToBack()), actionCollection(), "sendStencilToBack" ); - (void) new KAction(i18n("&Text..."), "text", 0, this, SLOT(textFormat()), + m_menuTextFormatAction = new KAction(i18n("&Text..."), "text", 0, this, SLOT(textFormat()), actionCollection(), "textFormat"); - (void) new KAction(i18n("&Stencils && Connectors..."), 0, 0, this, SLOT(stencilFormat()), + m_menuStencilConnectorsAction = new KAction(i18n("&Stencils && Connectors..."), 0, 0, this, SLOT(stencilFormat()), actionCollection(), "stencilFormat"); @@ -1239,4 +1239,7 @@ void KivioView::updateToolBars() m_setArrowHeads->setCurrentStartArrow(0); m_setArrowHeads->setCurrentEndArrow(0); + + m_menuTextFormatAction->setEnabled( false ); + m_menuStencilConnectorsAction->setEnabled( false ); } else @@ -1262,4 +1265,7 @@ void KivioView::updateToolBars() m_pStencilGeometryPanel->setPosition( pStencil->x(), pStencil->y() ); + m_menuTextFormatAction->setEnabled( true ); + m_menuStencilConnectorsAction->setEnabled( true ); + if ( pStencil->type() != kstConnector ) { @@ -1273,4 +1279,15 @@ void KivioView::updateToolBars() m_setArrowHeads->setCurrentStartArrow( pStencil->startAHType() ); m_setArrowHeads->setCurrentEndArrow( pStencil->endAHType() ); + } + + if ( pStencil->type() != kstText ) + { + m_setFGColor->setEnabled (true); + m_setBGColor->setEnabled (true); + } + else + { + m_setFGColor->setEnabled (false); + m_setBGColor->setEnabled (false); } } --- koffice/kivio/kiviopart/kivio_view.h #1.37:1.38 @@ -278,4 +278,6 @@ class KivioView : public KoView KAction* m_exportPage; KAction* m_arrowHeadsMenuAction; + KAction* m_menuTextFormatAction; + KAction* m_menuStencilConnectorsAction; KSelectAction* m_viewZoom; --- koffice/kivio/kiviopart/kiviosdk/kivio_stencil.h #1.15:1.16 @@ -76,5 +76,6 @@ typedef enum kstNormal = 0, kstConnector, - kstGroup + kstGroup, + kstText } KivioStencilType; --- koffice/kivio/plugins/kiviotexttool/tool_text.cpp #1.22:1.23 @@ -183,4 +183,5 @@ void TextTool::text(QRect r) KivioStencil* stencil = ss->newStencil(); + stencil->setType(kstText); stencil->setPosition(x,y); stencil->setDimensions(w,h); |