Summary: | KmPlot crashes when the Remove action is added in a toolbar and used to remove a graph | ||
---|---|---|---|
Product: | [Applications] kmplot | Reporter: | Anne-Marie Mahfouf <annma> |
Component: | general | Assignee: | Klaus-Dieter M <kd.moeller> |
Status: | RESOLVED FIXED | ||
Severity: | crash | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Anne-Marie Mahfouf
2005-09-26 21:26:03 UTC
SVN commit 465447 by fedemar: Bug 113387: KmPlot crashes when the Remove action is added in a toolbar and used to remove a graph. BUG: 113387 M +14 -0 View.cpp --- branches/KDE/3.5/kdeedu/kmplot/kmplot/View.cpp #465446:465447 @@ -1829,6 +1829,9 @@ void View::mnuHide_clicked() { + if ( csmode == -1 ) + return; + Ufkt *ufkt = &m_parser->ufkt[ m_parser->ixValue(csmode)]; switch (cstype ) { @@ -1865,6 +1868,9 @@ } void View::mnuRemove_clicked() { + if ( csmode == -1 ) + return; + if ( KMessageBox::warningContinueCancel(this,i18n("Are you sure you want to remove this function?"), QString::null, KStdGuiItem::del()) == KMessageBox::Continue ) { Ufkt *ufkt = &m_parser->ufkt[m_parser->ixValue(csmode)]; @@ -1888,6 +1894,8 @@ } void View::mnuEdit_clicked() { + if ( csmode == -1 ) + return; if ( m_parser->ufkt[m_parser->ixValue(csmode)].fstr[0] == 'x') // a parametric function { int y_index = csmode+1; //the y-function @@ -1919,12 +1927,18 @@ void View::mnuCopy_clicked() { + if ( csmode == -1 ) + return; + if ( m_parser->sendFunction(csmode) ) m_modified = true; } void View::mnuMove_clicked() { + if ( csmode == -1 ) + return; + if ( m_parser->sendFunction(csmode) ) { if (!m_parser->delfkt(csmode) ) |