Bug 123579 - Unable to create view objects
Summary: Unable to create view objects
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-13 23:14 UTC by Andrew Walker
Modified: 2006-03-14 22:11 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Walker 2006-03-13 23:14:25 UTC
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
Comment 1 George Staikos 2006-03-14 18:57:29 UTC
  I only see this with labels
Comment 2 Andrew Walker 2006-03-14 19:09:41 UTC
This happens with all view objects.
Comment 3 George Staikos 2006-03-14 22:03:19 UTC
  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
Comment 4 Andrew Walker 2006-03-14 22:11:29 UTC
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());
 }