diff --git a/kmplot/parser.cpp b/kmplot/parser.cpp --- a/kmplot/parser.cpp +++ b/kmplot/parser.cpp @@ -28,6 +28,7 @@ #include "parser.h" #include "parseradaptor.h" #include "settings.h" +#include "view.h" #include "xparser.h" //KDE includes @@ -695,10 +696,17 @@ if ( answer == KMessageBox::Cancel ) return false; } - + + int currentFunctionID = View::self()->m_currentPlot.functionID(); foreach ( Function *f, toRemove ) { uint id = f->id(); + // Disable trace mode if trace mode is enabled and reset statusbar + if ( (int)id == currentFunctionID ) + { + View::self()->m_currentPlot.setFunctionID( -1 ); + View::self()->resetStatusBar(); + } m_ufkt.remove( id ); delete f; emit functionRemoved( id ); diff --git a/kmplot/view.h b/kmplot/view.h --- a/kmplot/view.h +++ b/kmplot/view.h @@ -204,6 +204,10 @@ FunctionSection = 3, SectionCount = 4 }; + /** + * Resets the text in the statusbar. + */ + void resetStatusBar(); public slots: /// Called when the user want to cancel the drawing diff --git a/kmplot/view.cpp b/kmplot/view.cpp --- a/kmplot/view.cpp +++ b/kmplot/view.cpp @@ -4200,6 +4200,13 @@ } } + +void View::resetStatusBar() +{ + setStatusBar( QString(), RootSection ); + setStatusBar( QString(), FunctionSection ); +} + void View::setPrintHeaderTable( bool status ) { m_printHeaderTable = status;