[Kst] extragear/graphics/kst/kst

George Staikos staikos at kde.org
Mon Jun 6 06:24:09 CEST 2005


On Tuesday 24 May 2005 16:00, Rick Chern wrote:
> SVN commit 417848 by rchern:
>
> Multiple edit mode for data object dialogs
>
> Andrew will be changing PNGs to XPMs in UI files

  I still have some concerns here.

1) I have a ~4300 line diff which I will commit as soon as I have a net 
connection which will fix all kinds of formatting issues (please be careful 
and follow the coding guidelines - they're not my favorite either, but 
they're what we decided on quite a long time ago), some uninitialized 
variable references, some redundant code, etc.

2) This new code makes editting and enhancing dialogs very much more 
difficult.  I fear that we will regret this over time since it requires 
touching so many different areas when adding a new variable or widget.

3) It makes show() really break now.  It's not used from C++, but it's used 
very often from scripting.  In fact, that's the way that scripting interfaces 
with the dialogs.  Calling it is a guaranteed crash.

4) Two unexplained hunks in the diff still:
Index: kstimage.cpp
===================================================================
--- kstimage.cpp	(revision 417847)
+++ kstimage.cpp	(revision 417848)
@@ -292,7 +292,8 @@
   _zLower = lowerZ;
   _zUpper = upperZ;
   _autoThreshold = autoThreshold;
-  delete _pal;
+  if (_pal != pal)
+    delete _pal;
   _pal = pal;
   _hasColorMap = true;
   _hasContourMap = false;
@@ -324,7 +325,8 @@
   _zLower = lowerZ;
   _zUpper = upperZ;
   _autoThreshold = autoThreshold;
-  delete _pal;
+  if (_pal != pal)
+    delete _pal;
   _pal = pal;
   _numContourLines = numContours;
   _contourWeight = contourWeight;
Index: kstplugindialog_i.cpp
===================================================================
--- kstplugindialog_i.cpp	(revision 417847)
+++ kstplugindialog_i.cpp	(revision 417848)
@@ -44,6 +44,7 @@
 
 #define DIALOGTYPE KstPluginDialogI
 #define DTYPE "Plugin"
+#define NONMULTIPLEDIALOG 1
 #include "dataobjectdialog.h"
 
 
@@ -299,8 +300,8 @@
 
 
 void KstPluginDialogI::fixupLayout() {
-  _frameWidget->updateGeometry();
-  _pluginFrame->updateGeometry();
+  _frameWidget->resize(_frameWidget->sizeHint());
+  _pluginFrame->resize(_pluginFrame->sizeHint());
   resize(sizeHint());
   setMinimumSize(size());
   updateGeometry();
@@ -804,6 +805,7 @@
   // Create a new one
   QGridLayout *topGrid = dynamic_cast<QGridLayout*>(_pluginFrame->layout());
   if (topGrid) {
+    topGrid->invalidate();
     topGrid->addWidget(_frameWidget = new QWidget(_pluginFrame, "Frame 
Widget"), 0, 0);
   } else {
     kdError() << "Somehow we lost the grid!" << endl;


-- 
George Staikos
KDE Developer				http://www.kde.org/
Staikos Computing Services Inc.		http://www.staikos.net/


More information about the Kst mailing list