Bug 101725

Summary: Window size too small
Product: [Applications] kst Reporter: Andrew Walker <arwalker>
Component: generalAssignee: kst
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 1.x   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Andrew Walker 2005-03-17 19:40:33 UTC
Version:           HEAD (using KDE KDE 3.3.0)
Installed from:    Compiled From Sources
OS:                Linux

PROBLEM: Newly created windows are too small to be useful.

STEPS TO REPRODUCE:
Start Kst
Switch to childframe mode (if necessary) [Window...MDI Mode... Childframe mode]
Create a new window [Window...New...]
Resize the window to a reasonable size
Create another new window

RESULTS:
Both newly created windows are the same (very small) size

EXPECTED RESULTS:
The first window should have a reasonable default size.
The second window should have the same size as the resized first.
Comment 1 Andrew Walker 2005-03-18 01:35:10 UTC
One solution to this would be to remove the call to setMinimumSize(...) in KstViewWidget and the _assert on a null pixmap in kst2dplot.cpp. If there are no other suggestions I'll implement this.
Comment 2 George Staikos 2005-03-18 02:19:47 UTC
On Thursday 17 March 2005 19:35, Andrew Walker wrote:
> ------- One solution to this would be to remove the call to
> setMinimumSize(...) in KstViewWidget and the _assert on a null pixmap in
> kst2dplot.cpp. If there are no other suggestions I'll implement this.


   I suggest following the preconditions of KstViewObject, and not allowing 
breakage in the code by allowing invalid view objects to exist.
Comment 3 George Staikos 2005-03-21 04:37:09 UTC
CVS commit by staikos: 

use KMDI's own size hint
BUG: 101725


  M +1 -1      kst.cpp   1.296
  M +1 -1      kstdoc.cpp   1.155


--- kdeextragear-2/kst/kst/kst.cpp  #1.295:1.296
@@ -1798,5 +1798,5 @@ QString KstApp::newWindow(const QString&
   w->setCaption(nameToUse);
   w->setTabCaption(nameToUse);
-  addWindow(w);
+  addWindow(w, KMdi::StandardAdd | KMdi::UseKMdiSizeHint);
   w->activate();
   updateDialogsForWindow();

--- kdeextragear-2/kst/kst/kstdoc.cpp  #1.154:1.155
@@ -350,5 +350,5 @@ bool KstDoc::openDocument(const KURL& ur
 
         p = new KstViewWindow(e);
-        app->addWindow(p);
+        app->addWindow(p, KMdi::StandardAdd | KMdi::UseKMdiSizeHint);
         p->activate();
         if (toDelete) {