Version: HEAD (using KDE KDE 3.5.0) OS: Linux STEPS TO REPRODUCE: Start Kst Select label mode Create a new windoe Try to create a new label object by clicking and dragging within the new window RESULTS: Unable to create new label EXPECTED RESULTS: New label should be created
I only see this with labels
This happens with all view objects.
Correction, it happens with all, but only if we're in the object mode before the window is created. Switching modes after is not a problem
SVN commit 518660 by arwalker: BUG:123579 Ensure the _activeHandler is set for newly created windows so that view objects can be created. M +6 -0 kst.cpp M +2 -0 kst.h M +1 -1 ksttoplevelview.cpp --- trunk/extragear/graphics/kst/src/libkstapp/kst.cpp #518659:518660 @@ -1898,6 +1898,7 @@ } _viewMode = mode; + _createType = createType; } @@ -1906,6 +1907,11 @@ } +QString KstApp::currentCreateType() { + return _createType; +} + + KstApp::KstGraphicType KstApp::getGraphicType() { return _graphicType; } --- trunk/extragear/graphics/kst/src/libkstapp/kst.h #518659:518660 @@ -133,6 +133,7 @@ KstGraphicType getGraphicType(); KstTopLevelView::ViewMode currentViewMode(); + QString currentCreateType(); KstTopLevelViewPtr activeView(); Kst2DPlotMap* plotHolderWhileOpeningDocument(); @@ -570,6 +571,7 @@ KstGraphicType _graphicType; KstTopLevelView::ViewMode _viewMode; + QString _createType; QGuardedPtr<KstDebugNotifier> _debugNotifier; QGuardedPtr<KstDataNotifier> _dataNotifier; }; --- trunk/extragear/graphics/kst/src/libkstapp/ksttoplevelview.cpp #518659:518660 @@ -73,7 +73,7 @@ _mouseGrabbed = false; _activeHandler = 0L; _mode = Unknown; - setViewMode(KstApp::inst()->currentViewMode()); + setViewMode(KstApp::inst()->currentViewMode(), KstApp::inst()->currentCreateType()); }